added:
#coveredClasses
#version_CVS
changed:
#testDictionary01
#testOrderedCollection01_Sort1
#testOrderedDictionary01
--- a/RegressionTests__CollectionTests.st Mon Jul 04 18:03:29 2011 +0200
+++ b/RegressionTests__CollectionTests.st Mon Jul 04 21:37:54 2011 +0200
@@ -18,6 +18,10 @@
!CollectionTests class methodsFor:'documentation'!
+coveredClasses
+ ^ Collection withAllSubclasses
+!
+
documentation
"
documentation to be added.
@@ -37,6 +41,12 @@
"Created: / 8.11.2001 / 08:17:09 / cg"
! !
+!CollectionTests class methodsFor:'others'!
+
+version_CVS
+ ^ '$Header$'
+! !
+
!CollectionTests methodsFor:'helpers'!
collectedDoArgsOf:aCollection
@@ -66,7 +76,7 @@
self assert: ( d size == 3 ).
- self assert:(ret := self collectedDoArgsOf:d) = #('one' 'two' 'three').
+ self assert:(ret := self collectedDoArgsOf:d) asArray = #('one' 'two' 'three').
self assert:(ret := d collect:[:each | each]) = #('one' 'two' 'three') asBag.
self assert:(ret := d select:[:each | true]) = (Dictionary withAssociations:(Array with:(1->'one') with:(2->'two') with:(3->'three'))).
@@ -87,6 +97,8 @@
"
self basicNew testDictionary01
"
+
+ "Modified: / 04-07-2011 / 19:28:39 / cg"
! !
!CollectionTests methodsFor:'tests-general'!
@@ -172,35 +184,37 @@
col := #( 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ) copy.
col sort.
- self assert:( col = (1 to:20) ).
+ self assert:( col sameContentsAs: (1 to:20)).
col := #( 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ) copy reverse.
col sort.
- self assert:( col = (1 to:20) ).
+ self assert:( col sameContentsAs: (1 to:20) ).
col := #( 10 2 13 4 15 6 17 8 19 11 1 12 3 14 5 16 7 18 9 20 ) copy.
col sort.
- self assert:( col = (1 to:20) ).
+ self assert:( col sameContentsAs: (1 to:20) ).
col := ( 1 to: 10000 ) asOrderedCollection.
col sort.
- self assert:( col = (1 to:10000) ).
+ self assert:( col sameContentsAs: (1 to:10000) ).
col := ( 1 to: 10000 ) asOrderedCollection.
col2 := ( 1 to: 10000 ) asOrderedCollection.
col sortWith:col2.
- self assert:( col = (1 to:10000) ).
- self assert:( col2 = (1 to:10000) ).
+ self assert:( col sameContentsAs: (1 to:10000) ).
+ self assert:( col2 sameContentsAs: (1 to:10000) ).
col := ( 10000 to: 1 by:-1) asOrderedCollection.
col2 := ( 10000 to: 1 by:-1) asOrderedCollection.
col sortWith:col2.
- self assert:( col = (1 to:10000) ).
- self assert:( col2 = (1 to:10000) ).
+ self assert:( col sameContentsAs: (1 to:10000) ).
+ self assert:( col2 sameContentsAs: (1 to:10000) ).
"
self new testOrderedCollection01_Sort1
"
+
+ "Modified: / 04-07-2011 / 19:29:54 / cg"
!
testOrderedCollection02_SortBigCollection
@@ -282,7 +296,7 @@
self assert: ( d isEmpty not).
self assert: ( d notEmpty ).
- self assert:(ret := self collectedDoArgsOf:d) = #(1 2 3).
+ self assert:((ret := self collectedDoArgsOf:d) sameContentsAs: #(1 2 3)).
self assert: ( (d atIndex:1) == 1 ).
self assert: ( (d atIndex:2) == 2 ).
@@ -291,8 +305,8 @@
self assert: ( (d first) = ('one'->1) ).
self assert: ( (d last) = ('three'->3) ).
- self assert:(ret := d collect:[:each | each]) = #(1 2 3).
- self assert:(ret := d select:[:each | true]) = (OrderedDictionary withAssociations:(Array with:('one'->1) with:('two'->2) with:('three'->3))).
+ self assert:((ret := d collect:[:each | each]) sameContentsAs: #(1 2 3)).
+ self assert:((ret := d select:[:each | true]) sameContentsAs: (OrderedDictionary withAssociations:(Array with:('one'->1) with:('two'->2) with:('three'->3)))).
self assert: ( d includes:1 ).
self assert: ( d includes:2 ).
@@ -314,6 +328,8 @@
"
self basicNew testOrderedDictionary01
"
+
+ "Modified: / 04-07-2011 / 19:32:34 / cg"
! !
!CollectionTests methodsFor:'tests-orderedSet'!