[Pkg] The Trunk: TraitsTests-nice.14.mcz
commits at source.squeak.org
commits at source.squeak.org
Tue May 27 00:28:27 UTC 2014
Nicolas Cellier uploaded a new version of TraitsTests to project The Trunk:
http://source.squeak.org/trunk/TraitsTests-nice.14.mcz
==================== Summary ====================
Name: TraitsTests-nice.14
Author: nice
Time: 27 May 2014, 2:28:14.935 am
UUID: 44c0f5be-a415-4f22-a8b6-856fd0bf7e79
Ancestors: TraitsTests-fbs.13
Some Traits test do timeout. Relax the constraints.
=============== Diff against TraitsTests-fbs.13 ===============
Item was changed:
----- Method: TraitCompositionTest>>testAliasCompositions (in category 'testing-basic') -----
testAliasCompositions
+ <timeout: 30>
+
"unary"
-
self
shouldnt: [self t2 uses: self t1 @ { (#aliasM11 -> #m11) }]
raise: TraitCompositionException.
self
should: [self t2 uses: self t1 @ { (#alias: -> #m11) }]
raise: TraitCompositionException.
self
should: [self t2 uses: self t1 @ { (#alias:x:y: -> #m11) }]
raise: TraitCompositionException.
"binary"
self t1 compile: '= anObject'.
self
shouldnt: [self t2 uses: self t1 @ { (#equals: -> #=) }]
raise: TraitCompositionException.
self shouldnt: [self t2 uses: self t1 @ { (#% -> #=) }]
raise: TraitCompositionException.
self
should: [self t2 uses: self t1 @ { (#equals -> #=) }]
raise: TraitCompositionException.
self
should: [self t2 uses: self t1 @ { (#equals:x: -> #=) }]
raise: TraitCompositionException.
"keyword"
self t1 compile: 'x: a y: b z: c'.
self
should: [self t2 uses: self t1 @ { (#'==' -> #x:y:z:) }]
raise: TraitCompositionException.
self
should: [self t2 uses: self t1 @ { (#x -> #x:y:z:) }]
raise: TraitCompositionException.
self
should: [self t2 uses: self t1 @ { (#x: -> #x:y:z:) }]
raise: TraitCompositionException.
self
should: [self t2 uses: self t1 @ { (#x:y: -> #x:y:z:) }]
raise: TraitCompositionException.
self shouldnt:
[self t2 uses: self t1 @ { (#myX:y:z: -> #x:y:z:) }]
raise: TraitCompositionException.
"alias same as selector"
self
should: [self t2 uses: self t1 @ { (#m11 -> #m11) }]
raise: TraitCompositionException.
"same alias name used twice"
self should:
[self t2
uses: self t1 @ { (#alias -> #m11). (#alias -> #m12) }]
raise: TraitCompositionException.
"aliasing an alias"
self should:
[self t2
uses: self t1 @ { (#alias -> #m11). (#alias2 -> #alias) }]
raise: TraitCompositionException!
Item was changed:
----- Method: TraitMethodDescriptionTest>>testConflictMethodCreation (in category 'running') -----
testConflictMethodCreation
"Generate conflicting methods between t1 and t2
and check the resulting method in Trait t5 (or c2).
Also test selectors like foo:x (without space) or selectors with CRs."
+ <timeout: 30>
+
-
"unary"
-
self t2 compile: 'm12 ^false'.
self assert: ((self t5 sourceCodeAt: #m12) asString beginsWith: 'm12').
self should: [self c2 new m12] raise: Error.
"binary"
self t1 compile: '@ myArgument ^true'.
self t2 compile: '@myArgument ^false'.
self
assert: ((self t5 sourceCodeAt: #@) asString beginsWith: '@ arg1').
self should: [self c2 new @ 17] raise: Error.
"keyword"
self t1 compile: 'zork: myArgument
^true'.
self t2 compile: 'zork: myArgument ^false'.
self assert: ((self t5 sourceCodeAt: #zork:) asString
beginsWith: 'zork: arg1').
self should: [self c2 new zork: 17] raise: Error.
self t1 compile: 'zork:myArgument ^true'.
self t2 compile: 'zork:myArgument ^false'.
self assert: ((self t5 sourceCodeAt: #zork:) asString
beginsWith: 'zork: arg1').
self should: [self c2 new zork: 17] raise: Error.
self t1 compile: 'zork1: myArgument zork2: mySecondArgument ^true'.
self t2 compile: 'zork1: anObject zork2: anotherObject ^false'.
self assert: ((self t5 sourceCodeAt: #zork1:zork2:) asString
beginsWith: 'zork1: arg1 zork2: arg2').
self should: [self c2 new zork1: 1 zork2: 2] raise: Error!
More information about the Packages
mailing list