summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormichelou <michelou@epfl.ch>2007-03-22 18:35:55 +0000
committermichelou <michelou@epfl.ch>2007-03-22 18:35:55 +0000
commit058227a6664fd8ce87c6d3c7a4c267270a6a3c1f (patch)
tree0e049a336e0a7a0a39eda72cb007a0f8d54477b0
parent18bf6802667fcdef400f63c21a58fd532aa4a4a1 (diff)
downloadscala-058227a6664fd8ce87c6d3c7a4c267270a6a3c1f.tar.gz
scala-058227a6664fd8ce87c6d3c7a4c267270a6a3c1f.tar.bz2
scala-058227a6664fd8ce87c6d3c7a4c267270a6a3c1f.zip
added test cases in deeps.scala
-rw-r--r--test/files/run/deeps.check8
-rw-r--r--test/files/run/deeps.scala21
2 files changed, 29 insertions, 0 deletions
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
}