From 4afa092314487c0095ff9fd5756d05340f6150b0 Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Thu, 19 May 2011 20:06:19 +0000 Subject: Removes SUnit (long deprecated!) from the stand... Removes SUnit (long deprecated!) from the standard library. the relatively small number of partest tests in Scala's suite that were still using SUnit now either just use regular asserts, or they print stuff that partest checks with a .check file. Also fixed some bad indentation, removed ancient useless-looking commented-out code, etc. Contributed by Seth Tisue (way to go seth) no review. --- test/files/jvm/unittest_io_Jvm.scala | 31 +++++++++++-------------------- 1 file changed, 11 insertions(+), 20 deletions(-) (limited to 'test/files/jvm/unittest_io_Jvm.scala') diff --git a/test/files/jvm/unittest_io_Jvm.scala b/test/files/jvm/unittest_io_Jvm.scala index fd5889cb86..7c8ef131bc 100644 --- a/test/files/jvm/unittest_io_Jvm.scala +++ b/test/files/jvm/unittest_io_Jvm.scala @@ -1,24 +1,15 @@ -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()") { - - val src = Source.fromString(""" -This is a file -it is split on several lines. - -isn't it? -""") - def runTest() = assertEquals("wrong number of lines",src.getLines.toList.length,5) // five new lines in there - //for (line <- src.getLines) { - // Console.print(line) - //} +object Test { + def main(args: Array[String]) { + val lines = Source.fromString( + """| + |This is a file + |it is split on several lines. + | + |isn't it? + |""".stripMargin).getLines.toList + println("lines.size = " + lines.size) + lines.foreach(println) } - } -- cgit v1.2.3