summaryrefslogtreecommitdiff
path: root/test/files/run/collection-stacks.scala
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 /test/files/run/collection-stacks.scala
parent3ec24991df3d8bcf721ad30a806b4ef8b297728c (diff)
downloadscala-7ae5e07a4bd21acec210c8d684175393f270cfb2.tar.gz
scala-7ae5e07a4bd21acec210c8d684175393f270cfb2.tar.bz2
scala-7ae5e07a4bd21acec210c8d684175393f270cfb2.zip
Removed remaining invalid tests.
Diffstat (limited to 'test/files/run/collection-stacks.scala')
-rw-r--r--test/files/run/collection-stacks.scala38
1 files changed, 0 insertions, 38 deletions
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: