RegressionTests__CollectionTests.st
changeset 1424 56c64e1f572e
parent 1423 12f4039f6662
child 1447 2351db93aa5b
--- a/RegressionTests__CollectionTests.st	Thu May 12 16:51:23 2016 +0200
+++ b/RegressionTests__CollectionTests.st	Thu May 12 16:56:36 2016 +0200
@@ -807,6 +807,26 @@
     "
      self new testOrderedCollection08_addBefore  
     "
+!
+
+testOrderedCollection09_addAllBefore
+    |col|
+
+    col := #( 1 2 3 4 5 ) asOrderedCollection.
+    col addAll:#(-2 -1 0) beforeIndex:1.
+    self assert:(col asArray = #(-2 -1 0 1 2 3 4 5)).
+
+    col := OrderedCollection new:1.
+    col add:10.
+
+    col addAll:#(-2 -1 0) beforeIndex:1.
+    self assert:(col size == 4).
+    self assert:(col instVarNamed:'firstIndex') == 1.
+    self assert:(col instVarNamed:'lastIndex') == 4.
+    self assert:(col asArray = #(-2 -1 0 10)).
+    "
+     self new testOrderedCollection09_addAllBefore  
+    "
 ! !
 
 !CollectionTests methodsFor:'tests-orderedDictionary'!