Skip to content

Commit 40e8167

Browse files
committed
Fix scala-js/scala-js#3412: Throw an IOException in noThrowOnBadFileTest
This makes sure no Scala version regard the failure as fatal (NotImplementedError was considered fatal in 2.10). Also it simply makes much more sense.
1 parent 183409d commit 40e8167

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

js-envs-test-kit/src/main/scala/org/scalajs/jsenv/test/RunTests.scala

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,12 @@ private[test] class RunTests(config: JSEnvSuiteConfig, withCom: Boolean) {
118118

119119
@Test
120120
def noThrowOnBadFileTest: Unit = {
121+
def fail() = throw new java.io.IOException("exception for test")
122+
121123
val badFile = new VirtualBinaryFile {
122-
def path: String = ???
123-
def exists: Boolean = ???
124-
def inputStream: java.io.InputStream = ???
124+
def path: String = fail()
125+
def exists: Boolean = fail()
126+
def inputStream: java.io.InputStream = fail()
125127
}
126128

127129
// `start` may not throw but must fail asynchronously

0 commit comments

Comments
 (0)