[Pkg] The Trunk: MorphicTests-mt.26.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Aug 12 07:43:14 UTC 2014


Marcel Taeumel uploaded a new version of MorphicTests to project The Trunk:
http://source.squeak.org/trunk/MorphicTests-mt.26.mcz

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

Name: MorphicTests-mt.26
Author: mt
Time: 12 August 2014, 9:42:56.496 am
UUID: d26d5825-aec5-1741-88a8-e4b010c60ae7
Ancestors: MorphicTests-mt.25

Tests added for Morphic-mt.741

=============== Diff against MorphicTests-nice.24 ===============

Item was added:
+ ----- Method: MorphTest>>createAndAddMorphs: (in category 'support') -----
+ createAndAddMorphs: someNames
+ 
+ 	(self createMorphs: #(a b)) do: [:newMorph |
+ 		morph addMorphBack: newMorph].!

Item was added:
+ ----- Method: MorphTest>>createMorphs: (in category 'support') -----
+ createMorphs: someNames
+ 
+ 	^ someNames collect: [:nm | Morph new name: nm]!

Item was added:
+ ----- Method: MorphTest>>getSubmorph: (in category 'support') -----
+ getSubmorph: name
+ 
+ 	^ morph submorphs detect: [:m | m knownName = name]!

Item was added:
+ ----- Method: MorphTest>>getSubmorphNames (in category 'support') -----
+ getSubmorphNames
+ 
+ 	^ morph submorphs collect: [:m | m knownName asSymbol]!

Item was added:
+ ----- Method: MorphTest>>getSubmorphs: (in category 'support') -----
+ getSubmorphs: someNames
+ 
+ 	^ someNames collect: [:nm | self getSubmorph: nm]!

Item was added:
+ ----- Method: MorphTest>>testAddAllMorphs (in category 'testing - add/remove submorphs') -----
+ testAddAllMorphs
+ 
+ 	self createAndAddMorphs: #(a b).
+ 	self assert: #(a b) equals: self getSubmorphNames.
+ 
+ 	morph addAllMorphs: (self createMorphs: #(x y)).
+ 	self assert: #(a b x y) equals: self getSubmorphNames.
+ 	
+ 	morph removeAllMorphs.
+ 	morph addAllMorphs: (self createMorphs: #(x y)).
+ 	self assert: #(x y) equals: self getSubmorphNames.!

Item was added:
+ ----- Method: MorphTest>>testAddAllMorphsAfter (in category 'testing - add/remove submorphs') -----
+ testAddAllMorphsAfter
+ 
+ 	self createAndAddMorphs: #(a b).
+ 	self assert: #(a b) equals: self getSubmorphNames.
+ 
+ 	morph
+ 		addAllMorphs: (self createMorphs: #(x y))
+ 		after: (self getSubmorph: #a).
+ 	self assert: #(a x y b) equals: self getSubmorphNames.
+ 	
+ 	morph
+ 		addAllMorphs: (self getSubmorphs: #(x y))
+ 		after: (self getSubmorph: #b).
+ 	self assert: #(a b x y) equals: self getSubmorphNames.
+ 
+ 	morph
+ 		addAllMorphs: (self getSubmorphs: #(a x))
+ 		after: (self getSubmorph: #y).
+ 	self assert: #(b y a x) equals: self getSubmorphNames.
+ 
+ 	morph
+ 		addAllMorphs: (self getSubmorphs: #(x y))
+ 		after: (self getSubmorph: #a).
+ 	self assert: #(b a x y) equals: self getSubmorphNames.!

Item was added:
+ ----- Method: MorphTest>>testAddAllMorphsInFrontOf (in category 'testing - add/remove submorphs') -----
+ testAddAllMorphsInFrontOf
+ 
+ 	self createAndAddMorphs: #(a b).
+ 	self assert: #(a b) equals: self getSubmorphNames.
+ 
+ 	morph
+ 		addAllMorphs: (self createMorphs: #(x y))
+ 		inFrontOf: (self getSubmorph: #b).
+ 	self assert: #(a x y b) equals: self getSubmorphNames.
+ 	
+ 	morph
+ 		addAllMorphs: (self getSubmorphs: #(x y))
+ 		inFrontOf: (self getSubmorph: #a).
+ 	self assert: #(x y a b) equals: self getSubmorphNames.
+ 
+ 	morph
+ 		addAllMorphs: (self getSubmorphs: #(y b))
+ 		inFrontOf: (self getSubmorph: #x).
+ 	self assert: #(y b x a) equals: self getSubmorphNames.
+ 
+ 	morph
+ 		addAllMorphs: (self getSubmorphs: #(x y))
+ 		inFrontOf: (self getSubmorph: #b).
+ 	self assert: #(x y b a) equals: self getSubmorphNames.!



More information about the Packages mailing list