8000 Remove unnecessary `fail` helpers · sueka/scala-js@23ea680 · GitHub
[go: up one dir, main page]

Skip to content

Commit 23ea680

Browse files
committed
Remove unnecessary fail helpers
They were most likely introduced to work around the lack of a `Nothing` type in Java. `fail` seems not to be used in expression position anymore, so we can use the one provided by JUnit directly.
1 parent 6be482d commit 23ea680

File tree

2 files changed

+0
-10
lines changed

2 files changed

+0
-10
lines changed

test-common/src/test/scala/org/scalajs/testing/common/RPCCoreTest.scala

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,6 @@ class RPCCoreTest {
3434
val msg1: MsgEndpoint.EP[Int] = MsgEndpoint[Int](5)
3535
}
3636

37-
private def fail(msg: String): Nothing = {
38-
org.junit.Assert.fail(msg)
39-
throw new AssertionError("Shouldn't reach here")
40-
}
41-
4237
@Test
4338
def simpleEndpoint: Unit = {
4439
var called = false

test-common/src/test/scala/org/scalajs/testing/common/RunMuxRPCTest.scala

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,6 @@ class RunMuxRPCTest {
3535
val msg: MsgEndpoint.EP[RunMux[Unit]] = MsgEndpoint[RunMux[Unit]](3)
3636
}
3737

38-
private def fail(msg: String): Nothing = {
39-
org.junit.Assert.fail(msg)
40-
throw new AssertionError("Shouldn't reach here")
41-
}
42-
4338
@Test
4439
def muxedCall: Unit = {
4540
val called = Array.fill(10)(false)

0 commit comments

Comments
 (0)
0