diff options
author | Burak Emir <emir@epfl.ch> | 2007-03-22 03:28:30 +0000 |
---|---|---|
committer | Burak Emir <emir@epfl.ch> | 2007-03-22 03:28:30 +0000 |
commit | c61121a813abaace6e739a6f02e4c85b186f95a1 (patch) | |
tree | 74e4b0b57269397e888424346f674efcd933efc4 /test/files/jvm/unittest_io.scala | |
parent | 8e890c848ff68e69342d0f340df40f926857c861 (diff) | |
download | scala-c61121a813abaace6e739a6f02e4c85b186f95a1.tar.gz scala-c61121a813abaace6e739a6f02e4c85b186f95a1.tar.bz2 scala-c61121a813abaace6e739a6f02e4c85b186f95a1.zip |
new pattern matching algo
removed "removeoption"
changed SUnit and some tests
added useful debug msg in typer
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) - } - } } |