@@ -59,11 +59,12 @@ object Test extends StoreReporterDirectTest {
5959 val codeToRun = toCodeInSeparateLines(s " :require ${testOutput.path}/ $jar" , " test.Test.test()" )
6060 val output = ILoop .run(codeToRun, settings)
6161 val lines = output.split(" \n " )
62- val res1 = lines(4 ).contains(" Added" ) && lines(4 ).contains(" test1.jar" )
63- val res2 = lines(lines.length- 3 ).contains(" testing..." )
64-
65- println(s " test1 res1: $res1" )
66- println(s " test1 res2: $res2" )
62+ assert {
63+ lines(4 ).contains(" Added" ) && lines(4 ).contains(" test1.jar" )
64+ }
65+ assert {
66+ lines(lines.length- 3 ).contains(" testing..." )
67+ }
6768 }
6869
6970 def test2 (): Unit = {
@@ -75,11 +76,12 @@ object Test extends StoreReporterDirectTest {
7576 val codeToRun = toCodeInSeparateLines(s " :require ${testOutput.path}/ $jar1" , s " :require ${testOutput.path}/ $jar2" )
7677 val output = ILoop .run(codeToRun, settings)
7778 val lines = output.split(" \n " )
78- val res1 = lines(4 ).contains(" Added" ) && lines(4 ).contains(" test1.jar" )
79- val res2 = lines(lines.length- 3 ).contains(" test2.jar" ) && lines(lines.length- 3 ).contains(" existing classpath entries conflict" )
80-
81- println(s " test2 res1: $res1" )
82- println(s " test2 res2: $res2" )
79+ assert {
80+ lines(4 ).contains(" Added" ) && lines(4 ).contains(" test1.jar" )
81+ }
82+ assert {
83+ lines(lines.length- 3 ).contains(" test2.jar" ) && lines(lines.length- 3 ).contains(" existing classpath entries conflict" )
84+ }
8385 }
8486
8587 def test3 (): Unit = {
@@ -91,11 +93,12 @@ object Test extends StoreReporterDirectTest {
9193 val codeToRun = toCodeInSeparateLines(s " :require ${testOutput.path}/ $jar1" , s " :require ${testOutput.path}/ $jar3" , " test.Test3.test()" )
9294 val output = ILoop .run(codeToRun, settings)
9395 val lines = output.split(" \n " )
94- val res1 = lines(4 ).contains(" Added" ) && lines(4 ).contains(" test1.jar" )
95- val res2 = lines(lines.length- 3 ).contains(" new object in existing package" )
96-
97- println(s " test3 res1: $res1" )
98- println(s " test3 res2: $res2" )
96+ assert {
97+ lines(4 ).contains(" Added" ) && lines(4 ).contains(" test1.jar" )
98+ }
99+ assert {
100+ lines(lines.length- 3 ).contains(" new object in existing package" )
101+ }
99102 }
100103
101104 def test4 (): Unit = {
@@ -104,11 +107,12 @@ object Test extends StoreReporterDirectTest {
104107 val codeToRun = toCodeInSeparateLines(s " :require ${testOutput.path}/ $jar1" , s " :require ${testOutput.path}/ $jar1" )
105108 val output = ILoop .run(codeToRun, settings)
106109 val lines = output.split(" \n " )
107- val res1 = lines(4 ).contains(" Added" ) && lines(4 ).contains(" test1.jar" )
108- val res2 = lines(lines.length- 3 ).contains(" test1.jar" ) && lines(lines.length- 3 ).contains(" existing classpath entries conflict" )
109-
110- println(s " test4 res1: $res1" )
111- println(s " test4 res2: $res2" )
110+ assert {
111+ lines(4 ).contains(" Added" ) && lines(4 ).contains(" test1.jar" )
112+ }
113+ assert {
114+ lines(lines.length- 3 ).contains(" test1.jar" ) && lines(lines.length- 3 ).contains(" existing classpath entries conflict" )
115+ }
112116 }
113117
114118 def test5 (): Unit = {
@@ -138,5 +142,5 @@ object Test extends StoreReporterDirectTest {
138142 test6()
139143 }
140144
141- def toCodeInSeparateLines (lines : String * ): String = lines.map(_ + " \n " ).mkString
145+ def toCodeInSeparateLines (lines : String * ): String = lines mkString " \n "
142146}
0 commit comments