File tree Expand file tree Collapse file tree 3 files changed +11
-10
lines changed Expand file tree Collapse file tree 3 files changed +11
-10
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
//> using options -Wtostring-interpolated
2
2
3
- // verify warning messages and runtime result
3
+ // verify ~ warning messages and~ runtime result
4
4
// never mind, the test rig doesn't log diagnostics! unlike beloved partest.
5
5
6
+ // Sadly, junit is not available.
7
+ // import org.junit.Assert.assertEquals as jassert
8
+
9
+ def assertEquals (expected : String )(actual : String ): Unit = assert(expected == actual)
10
+
6
11
case class K (i : Int )
7
12
8
13
@ main def Test =
9
14
val k = K (42 )
10
- println :
15
+ assertEquals( " k == K(42) " ) :
11
16
s " k == $k"
12
- println :
17
+ assertEquals( " \\ k == \\ K(42) " ) :
13
18
raw " \k == \ $k"
14
- println :
19
+ assertEquals( " k == K(42) " ) :
15
20
f " k == $k"
16
- println :
21
+ assertEquals( " k == K(42) " ) :
17
22
f " k == $k%s "
Original file line number Diff line number Diff line change 1
1
//> using options -Wtostring-interpolated
2
2
3
- // verify warning messages and runtime result
3
+ // verify warning messages; cf run test; we must verify runtime while warning.
4
4
5
5
case class K (i : Int ):
6
6
def show : Unit = ()
You can’t perform that action at this time.
0 commit comments