Levente Uzonyi uploaded a new version of TraitsTests to project The Trunk:
http://source.squeak.org/trunk/TraitsTests-ul.4.mcz==================== Summary ====================
Name: TraitsTests-ul.4
Author: ul
Time: 11 January 2010, 8:34:18.363 am
UUID: 23ebfbe8-af71-e041-8920-43e5424f2336
Ancestors: TraitsTests-nice.3
- fix a test
=============== Diff against TraitsTests-nice.3 ===============
Item was changed:
----- Method: TraitTest>>testCompositionCopy (in category 'testing') -----
testCompositionCopy
+
| t6compositionCopyFirst c2compositionCopy |
self assert: (self t1 + self t2) allTraits
= (self t1 + self t2) copyTraitExpression allTraits.
self assert: (self t1 classTrait + self t2 classTrait) allTraits
= (self t1 classTrait + self t2 classTrait) copyTraitExpression allTraits.
self assert: self t6 traitComposition allTraits
= self t6 traitComposition copyTraitExpression allTraits.
self
assert: self t6 asTraitComposition copyTraitExpression allTraits = { (self t1). (self t2). (self t6) }.
- false ifTrue:[
"make no undue sharing happens of exclusions and aliases after an expression copy"
t6compositionCopyFirst := self t6 traitComposition copyTraitExpression.
+ t6compositionCopyFirst at: 1 put: #m22Alias -> #m33.
- t6compositionCopyFirst transformations at: 1 put: #m22Alias -> #m33.
self
+ assert: self t6 traitComposition second aliases first value
- assert: self t6 traitComposition transformations second aliases first value
= #m22.
c2compositionCopy := self c2 traitComposition copyTraitExpression.
+ c2compositionCopy first exclusions add: #m4.
+ self assert: self c2 traitComposition first exclusions = #(#m11) asSet.!
- c2compositionCopy transformations first exclusions at: 1 put: #m4.
- self c2 traitComposition transformations first exclusions = #(#m11 )
- ].!