From 9c50dd52743b7ff4de19548669dfa7e7a0304034 Mon Sep 17 00:00:00 2001 From: Adriaan Moors Date: Wed, 17 Jul 2013 09:27:29 -0700 Subject: Prepare removal of scala-xml, scala-parser-combinators Every test deleted here has found its way to the respective repositories of scala-xml and scala-parser-combinators, where they will continue to be tested with partest. The modified tests became independent of these modules, as they should've been from the start. --- test/files/run/unittest_io.scala | 42 ---------------------------------------- 1 file changed, 42 deletions(-) delete mode 100644 test/files/run/unittest_io.scala (limited to 'test/files/run/unittest_io.scala') diff --git a/test/files/run/unittest_io.scala b/test/files/run/unittest_io.scala deleted file mode 100644 index 2c3dacdf91..0000000000 --- a/test/files/run/unittest_io.scala +++ /dev/null @@ -1,42 +0,0 @@ - -@deprecated("Suppress warnings", since="2.11") -object Test { - - def main(args: Array[String]) { - UTF8Tests.run() - SourceTest.run() - } - - object UTF8Tests { - def decode(ch: Int) = new String(Array(ch), 0, 1).getBytes("UTF-8") - - def run() { - assert(new String( decode(0x004D), "utf8") == new String(Array(0x004D.asInstanceOf[Char]))) - assert(new String( decode(0x0430), "utf8") == new String(Array(0x0430.asInstanceOf[Char]))) - assert(new String( decode(0x4E8C), "utf8") == new String(Array(0x4E8C.asInstanceOf[Char]))) - assert(new String(decode(0x10302), "utf8") == new String(Array(0xD800.asInstanceOf[Char], - 0xDF02.asInstanceOf[Char]))) - // a client - val test = "{\"a\":\"\\u0022\"}" - val expected = "a" -> "\"" - - val parsed = scala.util.parsing.json.JSON.parseFull(test) - val result = parsed == Some(Map(expected)) - if(result) - assert(result) - else { - Console.println(parsed); assert(result) - } - } - } - - object SourceTest { - def run() { - val s = "Here is a test string" - val f = io.Source.fromBytes(s.getBytes("utf-8")) - val b = new collection.mutable.ArrayBuffer[Char]() - f.copyToBuffer(b) - assert(s == new String(b.toArray)) - } - } -} -- cgit v1.2.3