The Trunk: Tests-ul.75.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Tests-ul.75.mcz

commits-2
Levente Uzonyi uploaded a new version of Tests to project The Trunk:
http://source.squeak.org/trunk/Tests-ul.75.mcz

==================== Summary ====================

Name: Tests-ul.75
Author: ul
Time: 13 April 2010, 12:23:26.245 am
UUID: 932b69c2-7924-3148-8864-ccd9649b079a
Ancestors: Tests-laza.74

- added an integrity test for HashedCollections which checks if every HashedCollection subInstance has a prime capacity (except for MethodDictionaries which capacity should be a power of two)

=============== Diff against Tests-laza.74 ===============

Item was added:
+ TestCase subclass: #HashedCollectionIntegrityTest
+ instanceVariableNames: ''
+ classVariableNames: ''
+ poolDictionaries: ''
+ category: 'Tests-Bugs'!

Item was added:
+ ----- Method: HashedCollectionIntegrityTest>>testCapacity (in category 'as yet unclassified') -----
+ testCapacity
+
+ | inconsistentCollections |
+ inconsistentCollections := HashedCollection allSubInstances reject: [ :each |
+ each class == MethodDictionary "MethodDictionary is the only HashedCollection which doesn't have prime array size"
+ ifTrue: [ each capacity isPowerOfTwo ]
+ ifFalse: [ each capacity isPrime ] ].
+ self assert: inconsistentCollections isEmpty!