diff options
Diffstat (limited to 'test/files/jvm/unittest_io.scala')
-rw-r--r-- | test/files/jvm/unittest_io.scala | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/test/files/jvm/unittest_io.scala b/test/files/jvm/unittest_io.scala index 59b82ff57e..f4f2e08c7c 100644 --- a/test/files/jvm/unittest_io.scala +++ b/test/files/jvm/unittest_io.scala @@ -1,7 +1,11 @@ -object Test { +import scala.testing.SUnit._ +import scala.io.Source - import scala.testing.SUnit._ - import scala.io.Source +object Test extends TestConsoleMain { + + def suite = new TestSuite( + new ReadlinesTest + ) class ReadlinesTest extends TestCase("scala.io.Source method getLines") { @@ -11,20 +15,10 @@ it is split on several lines. isn't it? """) - assertEquals("wrong number of lines",src.getLines.toList.length,5) // five new lines in there + def runTest() = assertEquals("wrong number of lines",src.getLines.toList.length,5) // five new lines in there //for(val line <- src.getLines) { // Console.print(line) //} } - def main(args:Array[String]) = { - val ts = new TestSuite( - new ReadlinesTest - ) - val tr = new TestResult() - ts.run(tr) - for(val failure <- tr.failures) { - Console.println(failure) - } - } } |