File tree Expand file tree Collapse file tree 1 file changed +36
-30
lines changed
utest/test/src-2/test/utest Expand file tree Collapse file tree 1 file changed +36
-30
lines changed Original file line number Diff line number Diff line change @@ -9,40 +9,46 @@ object AssertsTestsVersionSpecific extends utest.TestSuite{
99 test(" failure" ){
1010 // Use compileError to check itself to verify that when it
1111 // doesn't throw an error, it actually does (super meta!)
12- * - compileError("""
13- compileError("1 + 1").check(
12+ test(" 1" ) {
13+ compileError("""
14+ compileError("1 + 1").check(
15+ ""
16+ )
17+ """ ).check(
18+ """
19+ compileError("1 + 1").check(
20+ ^
21+ """ ,
22+ " compileError check failed to have a compilation error"
23+ )
24+ }
25+ test(" 2" ) {
26+ compileError("""
27+ val x = 0
28+ compileError("x + x").check(
1429 ""
1530 )
16- """ ).check(
17- """
18- compileError("1 + 1").check(
19- ^
20- """ ,
21- " compileError check failed to have a compilation error"
22- )
23- * - compileError("""
24- val x = 0
25- compileError("x + x").check(
26- ""
31+ """ ).check(
32+ """
33+ compileError("x + x").check(
34+ ^
35+ """ ,
36+ " compileError check failed to have a compilation error"
2737 )
38+ }
39+ test(" 3" ) {
40+ compileError("""
41+ compileError("1" * 2).check(
42+ ""
43+ )
2844 """ ).check(
29- """
30- compileError("x + x").check(
31- ^
32- """ ,
33- " compileError check failed to have a compilation error"
34- )
35- * - compileError("""
36- compileError("1" * 2).check(
37- ""
38- )
39- """ ).check(
40- """
41- compileError("1" * 2).check(
42- ^
43- """ ,
44- " You can only have literal strings in compileError"
45- )
45+ """
46+ compileError("1" * 2).check(
47+ ^
48+ """ ,
49+ " You can only have literal strings in compileError"
50+ )
51+ }
4652
4753 }
4854 test(" compileTimeOnly" ){
You can’t perform that action at this time.
0 commit comments