summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/files/run/adding-growing-set.scala11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/files/run/adding-growing-set.scala b/test/files/run/adding-growing-set.scala
new file mode 100644
index 0000000000..5903813ed1
--- /dev/null
+++ b/test/files/run/adding-growing-set.scala
@@ -0,0 +1,11 @@
+/** This will run a a loooong time if Set's builder copies a
+ * complete new Set for every element.
+ */
+object Test {
+ def main(args: Array[String]): Unit = {
+ val a = new Array[Long](1000000)
+ (1 to 10000) foreach (i => a(i) = i)
+ val s = collection.mutable.Set(a: _*)
+ assert(s.sum > 0)
+ }
+}