summaryrefslogtreecommitdiff
path: root/test/files/jvm/unittest_io_Jvm.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-05-19 20:06:19 +0000
committerPaul Phillips <paulp@improving.org>2011-05-19 20:06:19 +0000
commit4afa092314487c0095ff9fd5756d05340f6150b0 (patch)
treed3cf421e67192041f78858fe10735505f4891b3c /test/files/jvm/unittest_io_Jvm.scala
parent7595671ec3929aa4ac978826521300a900250214 (diff)
downloadscala-4afa092314487c0095ff9fd5756d05340f6150b0.tar.gz
scala-4afa092314487c0095ff9fd5756d05340f6150b0.tar.bz2
scala-4afa092314487c0095ff9fd5756d05340f6150b0.zip
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.
Diffstat (limited to 'test/files/jvm/unittest_io_Jvm.scala')
-rw-r--r--test/files/jvm/unittest_io_Jvm.scala31
1 files changed, 11 insertions, 20 deletions
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)
}
-
}