From 058227a6664fd8ce87c6d3c7a4c267270a6a3c1f Mon Sep 17 00:00:00 2001 From: michelou Date: Thu, 22 Mar 2007 18:35:55 +0000 Subject: added test cases in deeps.scala --- test/files/run/deeps.check | 8 ++++++++ test/files/run/deeps.scala | 21 +++++++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/test/files/run/deeps.check b/test/files/run/deeps.check index abcd5b52c3..80ef1a86b5 100644 --- a/test/files/run/deeps.check +++ b/test/files/run/deeps.check @@ -24,6 +24,12 @@ false false true +false +false +true +false +false +true Array(true,false) Array(true,false) [true;false] @@ -73,3 +79,5 @@ a;b;a;b;a;b;a;b [[1; 2]; [3]] [[1; 2]; [3]] +Array(boo,and,foo) +Array(a) diff --git a/test/files/run/deeps.scala b/test/files/run/deeps.scala index 46377b1523..18d369903c 100644 --- a/test/files/run/deeps.scala +++ b/test/files/run/deeps.scala @@ -34,6 +34,18 @@ object Test extends Application { test(a3, b3) } + def testEquals4 { + Console.println("boo:and:foo".split(":") == "boo:and:foo".split(":")) + Console.println("boo:and:foo".split(":") equals "boo:and:foo".split(":")) + Console.println("boo:and:foo".split(":") deepEquals "boo:and:foo".split(":")) + + val xs = new java.util.ArrayList(); xs.add("a") + val ys = new java.util.ArrayList(); ys.add("a") + Console.println(xs.toArray == ys.toArray) + Console.println(xs.toArray equals ys.toArray) + Console.println(xs.toArray deepEquals ys.toArray) + } + def testToString1 { def sweep(s: String) = s.replaceAll("D@[0-9a-fA-F]+", "D@0000000") @@ -76,9 +88,18 @@ object Test extends Application { Console.println } + def testToString3 { + Console.println("boo:and:foo".split(":").deepToString) + + val xs = new java.util.ArrayList(); xs.add("a") + Console.println(xs.toArray.deepToString) + } + testEquals1 testEquals2 testEquals3 + testEquals4 testToString1 testToString2 + testToString3 } -- cgit v1.2.3