[Pkg] The Trunk: CollectionsTests-fbs.207.mcz
commits at source.squeak.org
commits at source.squeak.org
Mon Nov 4 18:32:33 UTC 2013
Frank Shearar uploaded a new version of CollectionsTests to project The Trunk:
http://source.squeak.org/trunk/CollectionsTests-fbs.207.mcz
==================== Summary ====================
Name: CollectionsTests-fbs.207
Author: fbs
Time: 4 November 2013, 6:31:01.83 pm
UUID: 4057d67b-5969-8b41-85d1-43fd39da4bb1
Ancestors: CollectionsTests-cmm.206
Move collection tests where they belong.
=============== Diff against CollectionsTests-cmm.206 ===============
Item was added:
+ ----- Method: ByteArrayTest>>testByteArrayLongAt (in category 'as yet unclassified') -----
+ testByteArrayLongAt
+ | ba value |
+ ba := ByteArray new: 4.
+ value := -1.
+ self shouldnt:[ba longAt: 1 put: value bigEndian: true] raise: Error.
+ self assert: (ba longAt: 1 bigEndian: true) = value.
+ self shouldnt:[ba longAt: 1 put: value bigEndian: false] raise: Error.
+ self assert: (ba longAt: 1 bigEndian: false) = value.!
Item was added:
+ ----- Method: DictionaryTest>>testIntegrityOfDictionaries (in category 'integrity tests') -----
+ testIntegrityOfDictionaries
+ #(
+ Dictionary
+ IdentityDictionary
+ SystemDictionary
+ LiteralDictionary
+ PluggableDictionary
+ WeakValueDictionary) do: [ :dictionaryClassName |
+ Smalltalk at: dictionaryClassName ifPresent: [ :dictionaryClass |
+ dictionaryClass allInstancesDo: [ :dictionary |
+ dictionary keysAndValuesDo: [ :key :value |
+ self assert: (dictionary at: key) == value ].
+ dictionary array doWithIndex: [ :association :index |
+ association ifNotNil: [
+ self assert: (dictionary scanFor: association key) = index ] ] ] ] ]!
Item was added:
+ ----- Method: DictionaryTest>>testMethodDictionaries (in category 'integrity tests') -----
+ testMethodDictionaries
+ MethodDictionary allInstancesDo: [ :dictionary |
+ dictionary keysAndValuesDo: [ :key :value |
+ self assert: (dictionary at: key) == value ].
+ 1 to: dictionary basicSize do: [ :index |
+ (dictionary basicAt: index)
+ ifNil: [ self assert: (dictionary array at: index) isNil ]
+ ifNotNil: [ :key |
+ self assert: (dictionary scanFor: key) = index ] ] ]!
Item was added:
+ ----- Method: HashedCollectionTest>>testCapacity (in category 'test - integrity') -----
+ 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!
Item was added:
+ ----- Method: ReadWriteStreamTest>>testReadWriteStreamNextNBug (in category 'tests') -----
+ testReadWriteStreamNextNBug
+ | aStream |
+ aStream := ReadWriteStream on: String new.
+ aStream nextPutAll: 'Hello World'.
+ self shouldnt:[aStream next: 5] raise: Error.!
More information about the Packages
mailing list