#UI_ENHANCEMENT by cg
authorClaus Gittinger <cg@exept.de>
Sun, 01 May 2016 22:08:59 +0200
changeset 1412 e3d230f00025
parent 1411 4d81edefbca9
child 1413 c9ef56f181ff
#UI_ENHANCEMENT by cg class: RegressionTests::BecomeTests added: #test60_becomeArray #test61_becomeArray
RegressionTests__BecomeTests.st
--- a/RegressionTests__BecomeTests.st	Sat Apr 30 10:57:14 2016 +0200
+++ b/RegressionTests__BecomeTests.st	Sun May 01 22:08:59 2016 +0200
@@ -187,6 +187,54 @@
     "
 
     "Created: / 30-04-2016 / 09:40:02 / cg"
+!
+
+test60_becomeArray
+    | a b  |
+
+    a := Array new:0.
+    b := Array new:0.
+
+    a add: 1.
+    ObjectMemory garbageCollect.
+    b add: 1.
+    ObjectMemory garbageCollect.
+    a add: 2.
+    ObjectMemory garbageCollect.
+    b add: 2.
+    ObjectMemory garbageCollect.
+    a printString.
+    b printString.
+    self 
+        assert: a size == 2;
+        assert: b size == 2.
+
+    "
+     self new test60_becomeArray
+    "
+
+    "Created: / 30-04-2016 / 09:40:02 / cg"
+!
+
+test61_becomeArray
+    | a b  |
+
+    a := Array new:0.
+    b := Array new:0.
+
+    50 timesRepeat:[
+        a add: 1.
+        ObjectMemory garbageCollect.
+        b add: 1.
+        ObjectMemory garbageCollect.
+    ].        
+    self 
+        assert: a size == 50;
+        assert: b size == 50.
+
+    "
+     self new test61_becomeArray
+    "
 ! !
 
 !BecomeTests class methodsFor:'documentation'!