Patrick Rein uploaded a new version of TraitsTests to project The Trunk:
http://source.squeak.org/trunk/TraitsTests-pre.16.mcz ==================== Summary ==================== Name: TraitsTests-pre.16 Author: pre Time: 19 July 2016, 11:49:05.039751 pm UUID: 323a0c3d-53a3-9447-a721-4aa097ac0a07 Ancestors: TraitsTests-pre.15 Fixes many of the TraitsTests failures by introducing a general timeout of 60 seconds for all of them. This is necessary to account for the long setup time for each test. Also refactors one test into several single test cases. =============== Diff against TraitsTests-pre.15 =============== Item was removed: - ----- 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 added: + ----- Method: TraitCompositionTest>>testAliasCompositionsRaisesErrorBinary (in category 'testing-basic') ----- + testAliasCompositionsRaisesErrorBinary + + "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.! Item was added: + ----- Method: TraitCompositionTest>>testAliasCompositionsRaisesErrorKeyword (in category 'testing-basic') ----- + testAliasCompositionsRaisesErrorKeyword + + "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.! Item was added: + ----- Method: TraitCompositionTest>>testAliasCompositionsRaisesErrorSpecial (in category 'testing-basic') ----- + testAliasCompositionsRaisesErrorSpecial + + "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 added: + ----- Method: TraitCompositionTest>>testAliasCompositionsRaisesErrorUnary (in category 'testing-basic') ----- + testAliasCompositionsRaisesErrorUnary + + "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.! 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! Item was added: + ----- Method: TraitsTestCase>>setUp (in category 'accessing') ----- + setUp + + super setUp. + self timeout: 90. "pre: This is necessary to account for the TraitsResrouce setup" + ! |
Free forum by Nabble | Edit this page |