summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Haller <hallerp@gmail.com>2009-11-08 22:30:59 +0000
committerPhilipp Haller <hallerp@gmail.com>2009-11-08 22:30:59 +0000
commit7ae5e07a4bd21acec210c8d684175393f270cfb2 (patch)
treeca42be880a826a0c371fe02c08097ff7cd25200a
parent3ec24991df3d8bcf721ad30a806b4ef8b297728c (diff)
downloadscala-7ae5e07a4bd21acec210c8d684175393f270cfb2.tar.gz
scala-7ae5e07a4bd21acec210c8d684175393f270cfb2.tar.bz2
scala-7ae5e07a4bd21acec210c8d684175393f270cfb2.zip
Removed remaining invalid tests.
-rw-r--r--test/files/pos/t0851.scala14
-rw-r--r--test/files/pos/t0872.scala8
-rw-r--r--test/files/run/collection-stacks.check14
-rw-r--r--test/files/run/collection-stacks.scala38
-rw-r--r--test/files/run/deeps.check83
-rw-r--r--test/files/run/deeps.scala111
-rw-r--r--test/files/run/t0485.check32
-rw-r--r--test/files/run/t0485.scala54
8 files changed, 0 insertions, 354 deletions
diff --git a/test/files/pos/t0851.scala b/test/files/pos/t0851.scala
deleted file mode 100644
index fc7109dcd4..0000000000
--- a/test/files/pos/t0851.scala
+++ /dev/null
@@ -1,14 +0,0 @@
-package test
-
-object test1 {
- case class Foo[T,T2](f : (T,T2) => String) extends (((T,T2)) => String){
- def apply(t : T) = (s:T2) => f(t,s)
- def apply(p : (T,T2)) = f(p._1,p._2)
- }
- implicit def g[T](f : (T,String) => String) = Foo(f)
- def main(args : Array[String]) : Unit = {
- val f = (x:Int,s:String) => s + x
- println(f(1))
- ()
- }
-}
diff --git a/test/files/pos/t0872.scala b/test/files/pos/t0872.scala
deleted file mode 100644
index 8f4c1c4436..0000000000
--- a/test/files/pos/t0872.scala
+++ /dev/null
@@ -1,8 +0,0 @@
-object Main {
- def main(args : Array[String]) {
- val fn = (a : Int, str : String) => "a: " + a + ", str: " + str
- implicit def fx[T](f : (T,String) => String) = (x:T) => f(x,null)
- println(fn(1))
- ()
- }
-}
diff --git a/test/files/run/collection-stacks.check b/test/files/run/collection-stacks.check
deleted file mode 100644
index fcb39c460c..0000000000
--- a/test/files/run/collection-stacks.check
+++ /dev/null
@@ -1,14 +0,0 @@
-1-2-3: true
-1-2-3: true
-apply
-1: true
-1: true
-3: true
-3: true
-top
-3: true
-3: true
-pop
-1-2: true
-3: true
-1-2: true
diff --git a/test/files/run/collection-stacks.scala b/test/files/run/collection-stacks.scala
deleted file mode 100644
index b159be07aa..0000000000
--- a/test/files/run/collection-stacks.scala
+++ /dev/null
@@ -1,38 +0,0 @@
-import scala.collection._
-
-object Test extends Application {
- def mutableStack[T](xs: T*): mutable.Stack[T] = {
- val s = new mutable.Stack[T]
- s.pushAll(xs)
- s
- }
-
- def immutableStack[T](xs: T*): immutable.Stack[T] = {
- immutable.Stack.Empty pushAll xs
- }
-
- def check[T](expected: T, got: T) {
- println(got + ": " + (expected == got))
- }
-
- // check #957
- check("1-2-3", immutableStack(1, 2, 3).iterator.mkString("-"))
- check("1-2-3", mutableStack(1, 2, 3).iterator.mkString("-"))
-
- println("apply")
- check(1, immutableStack(1, 2, 3).apply(0))
- check(1, mutableStack(1, 2, 3).apply(0))
- check(3, immutableStack(1, 2, 3).apply(2))
- check(3, mutableStack(1, 2, 3).apply(2))
-
- println("top")
- check(3, immutableStack(1, 2, 3).top)
- check(3, mutableStack(1, 2, 3).top)
-
- println("pop")
- check("1-2", immutableStack(1, 2, 3).pop.mkString("-"))
- check(3, mutableStack(1, 2, 3).pop())
- check("1-2", { val s = mutableStack(1, 2, 3); s.pop(); s.toList.mkString("-") })
-}
-
-// vim: set ts=2 sw=2 et:
diff --git a/test/files/run/deeps.check b/test/files/run/deeps.check
deleted file mode 100644
index f1925fcbc1..0000000000
--- a/test/files/run/deeps.check
+++ /dev/null
@@ -1,83 +0,0 @@
-false
-false
-true
-
-false
-false
-true
-
-x=Array(1)
-y=Array(1)
-false
-false
-true
-
-x=Array(Array(1), Array(1))
-y=Array(Array(1), Array(1))
-false
-false
-true
-
-x=Array(Array(Array(1), Array(1)), Array(Array(1), Array(1)))
-y=Array(Array(Array(1), Array(1)), Array(Array(1), Array(1)))
-false
-false
-true
-
-false
-false
-true
-false
-false
-true
-Array(true, false)
-Array(true, false)
-[true;false]
-true;false
-
-Array([Z@0000000, [Z@0000000)
-Array(Array(true, false), Array(true, false))
-[[true;false];[true;false]]
-true;false;true;false
-
-Array([[Z@0000000, [[Z@0000000)
-Array(Array(Array(true, false), Array(true, false)), Array(Array(true, false), Array(true, false)))
-[[[true;false];[true;false]];[[true;false];[true;false]]]
-true;false;true;false;true;false;true;false
-
-Array(1.0, 0.0)
-Array(1.0, 0.0)
-[1.0;0.0]
-1.0;0.0
-
-Array([D@0000000, [D@0000000)
-Array(Array(1.0, 0.0), Array(1.0, 0.0))
-[[1.0;0.0];[1.0;0.0]]
-1.0;0.0;1.0;0.0
-
-Array([[D@0000000, [[D@0000000)
-Array(Array(Array(1.0, 0.0), Array(1.0, 0.0)), Array(Array(1.0, 0.0), Array(1.0, 0.0)))
-[[[1.0;0.0];[1.0;0.0]];[[1.0;0.0];[1.0;0.0]]]
-1.0;0.0;1.0;0.0;1.0;0.0;1.0;0.0
-
-Array(a, b)
-Array(a, b)
-[a;b]
-a;b
-
-Array([Ljava.lang.String;@0000000, [Ljava.lang.String;@0000000)
-Array(Array(a, b), Array(a, b))
-[[a;b];[a;b]]
-a;b;a;b
-
-Array([[Ljava.lang.String;@0000000, [[Ljava.lang.String;@0000000)
-Array(Array(Array(a, b), Array(a, b)), Array(Array(a, b), Array(a, b)))
-[[[a;b];[a;b]];[[a;b];[a;b]]]
-a;b;a;b;a;b;a;b
-
-[[true; false]; [false]]
-[[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
deleted file mode 100644
index c93c040ef8..0000000000
--- a/test/files/run/deeps.scala
+++ /dev/null
@@ -1,111 +0,0 @@
-//############################################################################
-// deepEquals / deepToString
-//############################################################################
-
-//############################################################################
-// need to revisit array equqality
-object Test extends Application {
-
- def testEquals1 {
- println(Array(1) == Array(1))
- println(Array(1) equals Array(1))
- println(Array(1) deepEquals Array(1))
- println
- }
-
- def testEquals2 {
- println(Array(Array(1), Array(2)) == Array(Array(1), Array(2)))
- println(Array(Array(1), Array(2)) equals Array(Array(1), Array(2)))
- println(Array(Array(1), Array(2)) deepEquals Array(Array(1), Array(2)))
- println
- }
-
- def testEquals3 {
- val a1 = Array(1)
- val b1 = Array(1)
- val a2 = Array(a1, b1)
- val b2 = Array(a1, b1)
- val a3 = Array(a2, b2)
- val b3 = Array(a2, b2)
- def test[T](x: Array[T], y: Array[T]) {
- println("x=" + x.deepToString)
- println("y=" + y.deepToString)
- println(x == y)
- println(x equals y)
- println(x deepEquals y)
- println
- }
- test(a1, b1)
- test(a2, b2)
- test(a3, b3)
- }
-
- def testEquals4 {
- println("boo:and:foo".split(':') == "boo:and:foo".split(':'))
- println("boo:and:foo".split(':') equals "boo:and:foo".split(':'))
- println("boo:and:foo".split(':') deepEquals "boo:and:foo".split(':'))
-
- val xs = new java.util.ArrayList[String](); xs.add("a")
- val ys = new java.util.ArrayList[String](); ys.add("a")
- println(xs.toArray == ys.toArray)
- println(xs.toArray equals ys.toArray)
- println(xs.toArray deepEquals ys.toArray)
- }
-
- def testToString1 {
- def sweep(s: String) =
- s.replaceAll("D@[0-9a-fA-F]+", "D@0000000")
- .replaceAll("Z@[0-9a-fA-F]+", "Z@0000000")
- .replaceAll(";@[0-9a-fA-F]+", ";@0000000")
- def test[T](a: Array[T]) {
- println(sweep(a.toString))
- println(a.deepToString)
- println(a.deepMkString("[", ";", "]"))
- println(a.deepMkString(";"))
- println
- }
-
- val ba1 = Array(true, false)
- val ba2 = Array(ba1, ba1)
- val ba3 = Array(ba2, ba2)
- test(ba1)
- test(ba2)
- test(ba3)
-
- val da1 = Array(1.0d, 0.0d)
- val da2 = Array(da1, da1)
- val da3 = Array(da2, da2)
- test(da1)
- test(da2)
- test(da3)
-
- val sa1 = Array("a", "b")
- val sa2 = Array(sa1, sa1)
- val sa3 = Array(sa2, sa2)
- test(sa1)
- test(sa2)
- test(sa3)
- }
-
- def testToString2 {
- println(Array(Array(true, false), Array(false)).deepMkString("[", "; ", "]"))
- println(Array(Array('1', '2'), Array('3')).deepMkString("[", "; ", "]"))
- println(Array(Array(1, 2), Array(3)).deepMkString("[", "; ", "]"))
- println
- }
-
- def testToString3 {
- println("boo:and:foo".split(':').deepToString)
-
- val xs = new java.util.ArrayList[String](); xs.add("a")
- println(xs.toArray.deepToString)
- }
-
- testEquals1
- testEquals2
- testEquals3
- testEquals4
- testToString1
- testToString2
- testToString3
-}
diff --git a/test/files/run/t0485.check b/test/files/run/t0485.check
deleted file mode 100644
index 3a462cfdc1..0000000000
--- a/test/files/run/t0485.check
+++ /dev/null
@@ -1,32 +0,0 @@
-m1={(10,20), (20,30)}
-m2={(10,20)}
-m1.size > m2.size is true
-m1 equals m2 is true
-
-m1={(10,20), (20,30)}
-m2={(10,20)}
-m1.size > m2.size is true
-m1 equals m2 is true
-
-m1={(10,20), (20,30)}
-m2={(10,20)}
-m1.size > m2.size is true
-m1 equals m2 is true
-
-java.lang.CloneNotSupportedException: The underlying map doesn't implement the Cloneable interface
-
-s1=[10, 20]
-s2=[10]
-s1.size > s2 is true
-s1 equals s2 is true
-
-s1=[10, 20]
-s2=[10]
-s1.size > s2 is true
-s1 equals s2 is true
-
-s1=[10, 20]
-s2=[10]
-s1.size > s2 is true
-s1 equals s2 is true
-
diff --git a/test/files/run/t0485.scala b/test/files/run/t0485.scala
deleted file mode 100644
index 9e2017aacc..0000000000
--- a/test/files/run/t0485.scala
+++ /dev/null
@@ -1,54 +0,0 @@
-import scala.collection.jcl
-
-object Test extends Application {
- testMap
- testSet
-}
-
-object testMap {
- def toString(m1: collection.Map[Int, Int]): String =
- m1.toList.sort((x, y) => x < y).mkString("{", ", ", "}")
- def test(m1: jcl.Map[Int, Int]) {
- try {
- m1.put(10, 20)
- val m2 = m1.clone()
- m1.put(20, 30)
- println("m1="+toString(m1))
- println("m2="+toString(m2))
- println("m1.size > m2.size is "+ (m1.size > m2.size))
- m1.remove((20, 30))
- println("m1 equals m2 is "+ (m1 equals m2))
- println()
- }
- catch {
- case e: Exception =>
- println(e); println()
- }
- }
- test(new jcl.HashMap[Int, Int])
- // Clone on IdentityHashMap of java-ibm-1.6 behaves differently than all others
- // Therefore, for now we will not perform this test on it.
- // test(new jcl.IdentityHashMap[Int, Int])
- test(new jcl.LinkedHashMap[Int, Int])
- test(new jcl.TreeMap[Int, Int])
- test(new jcl.WeakHashMap[Int, Int])
-}
-
-object testSet {
- def toString(s1: collection.Set[Int]): String =
- s1.toList.sort((x, y) => x < y).mkString("[", ", ", "]")
- def test(s1: jcl.Set[Int]) {
- s1.add(10)
- val s2 = s1.clone()
- s1.add(20)
- println("s1="+toString(s1))
- println("s2="+toString(s2))
- println("s1.size > s2 is "+ (s1.size > s2.size))
- s1.remove(20)
- println("s1 equals s2 is "+ (s1 equals s2))
- println()
- }
- test(new jcl.HashSet[Int])
- test(new jcl.LinkedHashSet[Int])
- test(new jcl.TreeSet[Int])
-}