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 | |
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')
-rw-r--r-- | test/files/jvm/unittest_io.scala | 22 | ||||
-rw-r--r-- | test/files/jvm/unittest_xml.scala | 2 | ||||
-rw-r--r-- | test/files/jvm/xml01.scala | 2 |
3 files changed, 12 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) - } - } } diff --git a/test/files/jvm/unittest_xml.scala b/test/files/jvm/unittest_xml.scala index 312b69d529..6fdacbbf75 100644 --- a/test/files/jvm/unittest_xml.scala +++ b/test/files/jvm/unittest_xml.scala @@ -64,6 +64,7 @@ object Test { } class UtilityTest extends TestCase("scala.xml.Utility") with Assert { + def runTest() = { val x = <foo> <toomuchws/> </foo> @@ -92,6 +93,7 @@ object Test { assertEquals("pretty print sorted attrib:"+pp.format(q), "<a a=\"2\" g=\"3\" j=\"2\" oo=\"2\"></a>", pp.format(q)) } + } def main(args:Array[String]) = { val ts = new TestSuite( diff --git a/test/files/jvm/xml01.scala b/test/files/jvm/xml01.scala index 8c99cfd358..7de6211e29 100644 --- a/test/files/jvm/xml01.scala +++ b/test/files/jvm/xml01.scala @@ -209,6 +209,8 @@ object Test { //Console.println("char '"+c+"' \u015e"); assertTrue(c == '\u015e'); } + // buraq: if the following test fails with 'character x not allowed', it is + // related to the mutable variable in a closures in MarkupParser.parsecharref { val isr = scala.io.Source.fromString(xmlAttrValueNorm); val pxmlB = scala.xml.parsing.ConstructingParser.fromSource(isr,false); |