-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle a StackOverflowError in addition to NonFatal errors
if they are happening inside a test I only execute the test on the JVM, because - on JS the error message is different - on Native the runner just terminates
- Loading branch information
Showing
3 changed files
with
45 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
tests/shared/src/main/scala/munit/Issue583FrameworkSuite.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package munit | ||
|
||
class Issue583FrameworkSuite extends FunSuite { | ||
test("simple test") { | ||
() | ||
} | ||
test("infinite loop test") { | ||
def loop(x: Int): Int = loop(x) + loop(x) | ||
|
||
loop(0) | ||
} | ||
test("another test") { | ||
() | ||
} | ||
} | ||
|
||
object Issue583FrameworkSuite | ||
extends FrameworkTest( | ||
classOf[Issue583FrameworkSuite], | ||
"""|==> success munit.Issue583FrameworkSuite.simple test | ||
|==> failure munit.Issue583FrameworkSuite.infinite loop test - null | ||
|==> success munit.Issue583FrameworkSuite.another test | ||
|""".stripMargin, | ||
//tags = Set(OnlyJVM) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters