--- a/RegressionTests__SegmentedOrderedCollectionTests.st Wed Jun 29 13:00:17 2016 +0000
+++ b/RegressionTests__SegmentedOrderedCollectionTests.st Wed Jun 29 15:55:29 2016 +0200
@@ -1,4 +1,4 @@
-"{ Package: 'exept:regression' }"
+"{ Package: 'stx:goodies/regression' }"
"{ NameSpace: RegressionTests }"
@@ -16,7 +16,7 @@
documentation to be added.
[author:]
- cg
+ cg
[instance variables:]
@@ -42,14 +42,14 @@
self assert:(c last == 10).
20 to:20000 by:10 do:[:each |
- c add:each
+ c add:each
].
self assert:(c size == 2000).
self assert:(c first == 10).
self assert:(c last == 20000).
1 to:1000 do:[:i |
- c removeFirst
+ c removeFirst
].
self assert:(c first == 10010).
self assert:(c last == 20000).
@@ -75,10 +75,10 @@
self assert:(c first == 15000).
1 to:999 do:[:i |
- c addFirst:i
+ c addFirst:i
].
1 to:999 do:[:i |
- self assert:(c at:i) == (1000-i).
+ self assert:(c at:i) == (1000-i).
].
self assert:(c size == (501+999)).
@@ -94,7 +94,7 @@
c removeIndex:250.
999 to:1 by:-1 do:[:i |
- self assert:(c removeFirst == i)
+ self assert:(c removeFirst == i)
].
c removeFirst.
@@ -117,7 +117,7 @@
self assert:(c at:1) == 15010.
self assert:(c at:2) == 19990.
3 to:1000 do:[:i |
- self assert:(c at:i) == nil
+ self assert:(c at:i) == nil
].
c grow:105.
@@ -125,7 +125,7 @@
self assert:(c at:1) == 15010.
self assert:(c at:2) == 19990.
3 to:105 do:[:i |
- self assert:(c at:i) == nil
+ self assert:(c at:i) == nil
].
"
@@ -140,18 +140,18 @@
"/ adding at the end: OC is faster
tAdd := TimeDuration toRun:[
- c := SegmentedOrderedCollection new.
- 1 to:200000 do:[:i |
- c add:i
- ].
+ c := SegmentedOrderedCollection new.
+ 1 to:200000 do:[:i |
+ c add:i
+ ].
].
Transcript show:'Time to add 200000 elements to sc: '; showCR:tAdd.
tAdd := TimeDuration toRun:[
- c := OrderedCollection new.
- 1 to:200000 do:[:i |
- c add:i
- ].
+ c := OrderedCollection new.
+ 1 to:200000 do:[:i |
+ c add:i
+ ].
].
Transcript show:'Time to add 200000 elements to oc: '; showCR:tAdd.
@@ -160,17 +160,17 @@
c := SegmentedOrderedCollection withAll:(1 to:200000).
tRemove := TimeDuration toRun:[
- 1 to:200000 do:[:i |
- c removeFirst
- ].
+ 1 to:200000 do:[:i |
+ c removeFirst
+ ].
].
Transcript show:'Time to remove 200000 elements from sc: '; showCR:tRemove.
c := OrderedCollection withAll:(1 to:200000).
tRemove := TimeDuration toRun:[
- 1 to:200000 do:[:i |
- c removeFirst
- ].
+ 1 to:200000 do:[:i |
+ c removeFirst
+ ].
].
Transcript show:'Time to remove 200000 elements from oc: '; showCR:tRemove.
@@ -179,17 +179,17 @@
c := SegmentedOrderedCollection withAll:(1 to:200000).
tRemove := TimeDuration toRun:[
- 1 to:100000 do:[:i |
- c removeIndex:2000
- ].
+ 1 to:100000 do:[:i |
+ c removeIndex:2000
+ ].
].
Transcript show:'Time to remove 100000 elements from inside sc: '; showCR:tRemove.
c := OrderedCollection withAll:(1 to:200000).
tRemove := TimeDuration toRun:[
- 1 to:100000 do:[:i |
- c removeIndex:2000
- ].
+ 1 to:100000 do:[:i |
+ c removeIndex:2000
+ ].
].
Transcript show:'Time to remove 100000 elements from inside oc: '; showCR:tRemove.