summaryrefslogtreecommitdiff
path: root/test/files/run
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@typesafe.com>2012-12-10 12:24:17 -0800
committerAdriaan Moors <adriaan.moors@typesafe.com>2012-12-10 12:24:17 -0800
commit860d3002bcc3607e907e1afc39180cd2bb82e220 (patch)
treeab2bc8dd7194b93ca9441f3284447ec6a0276794 /test/files/run
parent0d548de547d49c3c038728b8af2d1b1dbd697918 (diff)
parentbd04b2cb681328a0e35c4f77b58ec4a623e047c7 (diff)
downloadscala-860d3002bcc3607e907e1afc39180cd2bb82e220.tar.gz
scala-860d3002bcc3607e907e1afc39180cd2bb82e220.tar.bz2
scala-860d3002bcc3607e907e1afc39180cd2bb82e220.zip
Merge pull request #1733 from retronym/ticket/6614
SI-6614 Test case for fixed ArrayStack misconduct.
Diffstat (limited to 'test/files/run')
-rw-r--r--test/files/run/t6614.check11
-rw-r--r--test/files/run/t6614.scala8
2 files changed, 19 insertions, 0 deletions
diff --git a/test/files/run/t6614.check b/test/files/run/t6614.check
new file mode 100644
index 0000000000..2e80ebda8b
--- /dev/null
+++ b/test/files/run/t6614.check
@@ -0,0 +1,11 @@
+(ArrayStack(),true)
+(ArrayStack(0),true)
+(ArrayStack(0, 1),true)
+(ArrayStack(0, 1, 2),true)
+(ArrayStack(0, 1, 2, 3),true)
+(ArrayStack(0, 1, 2, 3, 4),true)
+(ArrayStack(0, 1, 2, 3, 4, 5),true)
+(ArrayStack(0, 1, 2, 3, 4, 5, 6),true)
+(ArrayStack(0, 1, 2, 3, 4, 5, 6, 7),true)
+(ArrayStack(0, 1, 2, 3, 4, 5, 6, 7, 8),true)
+(ArrayStack(0, 1, 2, 3, 4, 5, 6, 7, 8, 9),true)
diff --git a/test/files/run/t6614.scala b/test/files/run/t6614.scala
new file mode 100644
index 0000000000..3ad9f36fc4
--- /dev/null
+++ b/test/files/run/t6614.scala
@@ -0,0 +1,8 @@
+object Test extends App {
+ import scala.collection.mutable.ArrayStack
+
+ println((for (i <- 0 to 10) yield {
+ val in = ArrayStack.tabulate(i)(_.toString)
+ (in, (in filter (_ => true)) == in)
+ }).mkString("\n"))
+}