summaryrefslogtreecommitdiff
path: root/test/files/run
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2013-02-01 17:41:04 -0800
committerPaul Phillips <paulp@improving.org>2013-02-01 17:41:04 -0800
commit3dd9b3683b10edcf4f58ba1d98d4914c04614d87 (patch)
tree6be6c0f233b67595c306b37fde1cf3e08252efc8 /test/files/run
parentccaa65a4969572631746d40d35bcd1fcfcaa51a9 (diff)
parentb403234a27518f35acc360bfa0333b00fdc85175 (diff)
downloadscala-3dd9b3683b10edcf4f58ba1d98d4914c04614d87.tar.gz
scala-3dd9b3683b10edcf4f58ba1d98d4914c04614d87.tar.bz2
scala-3dd9b3683b10edcf4f58ba1d98d4914c04614d87.zip
Merge commit 'b403234a27' into wip/fresh-merge2
Conflicts: src/compiler/scala/tools/nsc/matching/ParallelMatching.scala src/compiler/scala/tools/nsc/transform/ExplicitOuter.scala src/compiler/scala/tools/nsc/typechecker/NamesDefaults.scala test/files/neg/t6963.check
Diffstat (limited to 'test/files/run')
-rw-r--r--test/files/run/t3353.check1
-rw-r--r--test/files/run/t3353.scala10
-rw-r--r--test/files/run/t6853.scala18
3 files changed, 29 insertions, 0 deletions
diff --git a/test/files/run/t3353.check b/test/files/run/t3353.check
new file mode 100644
index 0000000000..8b4ae1fe69
--- /dev/null
+++ b/test/files/run/t3353.check
@@ -0,0 +1 @@
+Got: foo and None
diff --git a/test/files/run/t3353.scala b/test/files/run/t3353.scala
new file mode 100644
index 0000000000..eeb63c1b05
--- /dev/null
+++ b/test/files/run/t3353.scala
@@ -0,0 +1,10 @@
+object Test extends App {
+
+ "foo" match {
+ case Matcher(result) => println(result)
+ }
+
+ object Matcher{
+ def unapply(s: String)(implicit secondParam: Option[String] = None) = Some("Got: " + s + " and " + secondParam)
+ }
+}
diff --git a/test/files/run/t6853.scala b/test/files/run/t6853.scala
new file mode 100644
index 0000000000..352375c99c
--- /dev/null
+++ b/test/files/run/t6853.scala
@@ -0,0 +1,18 @@
+// Test cases: the only place we can cut and paste without crying
+// ourself to sleep.
+object Test {
+
+ def main(args: Array[String]): Unit = {
+ // First testing the basic operations
+ val m = collection.mutable.ListMap[String, Int]()
+ var i = 0
+ while(i < 2) { m += ("foo" + i) -> i; i = i+1}
+ assert(m == Map("foo1"->1,"foo0"->0))
+ m-= "foo0"
+ assert(m == Map("foo1"->1))
+ // Now checking if it scales as described in SI-6853
+ i = 0
+ while(i < 80000) { m += ("foo" + i) -> i; i = i+1}
+ assert(m.size == 80000)
+ }
+}