diff options
author | Felix Mulder <felix.mulder@gmail.com> | 2017-03-28 16:27:13 +0200 |
---|---|---|
committer | Felix Mulder <felix.mulder@gmail.com> | 2017-03-29 13:34:51 +0200 |
commit | c8321d6a42348308feaf586380ef07ae24e420c8 (patch) | |
tree | f973c3990c99d65355c6ebd374b72e997a4c9440 | |
parent | af4bb48a3e1f164f4f5fadd0ac0554f8e5e56081 (diff) | |
download | dotty-c8321d6a42348308feaf586380ef07ae24e420c8.tar.gz dotty-c8321d6a42348308feaf586380ef07ae24e420c8.tar.bz2 dotty-c8321d6a42348308feaf586380ef07ae24e420c8.zip |
Add test to check failure of non-tail recursive
-rw-r--r-- | compiler/test/dotty/tools/dotc/ParallelTestTests.scala | 6 | ||||
-rw-r--r-- | tests/partest-test/stackOverflow.scala | 7 |
2 files changed, 12 insertions, 1 deletions
diff --git a/compiler/test/dotty/tools/dotc/ParallelTestTests.scala b/compiler/test/dotty/tools/dotc/ParallelTestTests.scala index 30ec88455..9964be036 100644 --- a/compiler/test/dotty/tools/dotc/ParallelTestTests.scala +++ b/compiler/test/dotty/tools/dotc/ParallelTestTests.scala @@ -26,7 +26,8 @@ class ParallelTestTests extends ParallelTesting { @Test def pos1Error: Unit = compileFile("../tests/partest-test/posFail1Error.scala", defaultOptions).expectFailure.checkCompile() - @Test def negMissingAnnot: Unit = compileFile("../tests/partest-test/negMissingAnnot.scala", defaultOptions).expectFailure.checkExpectedErrors() + @Test def negMissingAnnot: Unit = + compileFile("../tests/partest-test/negMissingAnnot.scala", defaultOptions).expectFailure.checkExpectedErrors() @Test def negAnnotWrongLine: Unit = compileFile("../tests/partest-test/negAnnotWrongLine.scala", defaultOptions).expectFailure.checkExpectedErrors() @@ -48,4 +49,7 @@ class ParallelTestTests extends ParallelTesting { @Test def runDiffOutput1: Unit = compileFile("../tests/partest-test/runDiffOutput1.scala", defaultOptions).expectFailure.checkRuns() + + @Test def runStackOverflow: Unit = + compileFile("../tests/partest-test/stackOverflow.scala", defaultOptions).expectFailure.checkRuns() } diff --git a/tests/partest-test/stackOverflow.scala b/tests/partest-test/stackOverflow.scala new file mode 100644 index 000000000..b3132cc19 --- /dev/null +++ b/tests/partest-test/stackOverflow.scala @@ -0,0 +1,7 @@ +object Test { + def foo: Int = bar + def bar: Int = foo + + def main(args: Array[String]): Unit = + println(foo) +} |