summaryrefslogtreecommitdiff
path: root/test/junit
diff options
context:
space:
mode:
authorIchoran <ichoran@gmail.com>2015-01-30 14:54:51 -0800
committerIchoran <ichoran@gmail.com>2015-01-30 14:54:51 -0800
commit5d7098c629bbb7cc0ab7e74c235bd4afca3de24e (patch)
tree4a43c8211e49010f89af14bbb968e964f32d7767 /test/junit
parent41a5f4517e981144c7f72fff1d465ab034b8196d (diff)
parentfb043761806f8ef2c7a662f15ba5ac5731426dbf (diff)
downloadscala-5d7098c629bbb7cc0ab7e74c235bd4afca3de24e.tar.gz
scala-5d7098c629bbb7cc0ab7e74c235bd4afca3de24e.tar.bz2
scala-5d7098c629bbb7cc0ab7e74c235bd4afca3de24e.zip
Merge pull request #4259 from mzitnik/2.11.x
SI-9072 Vector ++ concatenation of parallel collection cause inconsisten...
Diffstat (limited to 'test/junit')
-rw-r--r--test/junit/scala/collection/immutable/VectorTest.scala20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/junit/scala/collection/immutable/VectorTest.scala b/test/junit/scala/collection/immutable/VectorTest.scala
new file mode 100644
index 0000000000..e7edba3e43
--- /dev/null
+++ b/test/junit/scala/collection/immutable/VectorTest.scala
@@ -0,0 +1,20 @@
+package scala.collection.immutable
+
+import org.junit.{Assert, Test}
+import org.junit.runner.RunWith
+import org.junit.runners.JUnit4
+
+@RunWith(classOf[JUnit4])
+class VectorTest {
+ /**
+ * Test Vector ++ with a small parallel collection concatenation (SI-9072).
+ *
+ */
+ @Test
+ def testPlusPlus(): Unit = {
+ val smallVec = (0 to 1)
+ val smallParVec = smallVec.par
+ val testElementsSize = (0 to 1000).map( _ => Vector.empty ++ smallParVec )
+ Assert.assertTrue(testElementsSize.forall( v => v.size == 2 ))
+ }
+}