[squeak-dev] The Inbox: MorphicTests-mt.25.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Feb 10 12:01:20 UTC 2014


A new version of MorphicTests was added to project The Inbox:
http://source.squeak.org/inbox/MorphicTests-mt.25.mcz

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

Name: MorphicTests-mt.25
Author: mt
Time: 10 February 2014, 1:01:25.418 pm
UUID: 34cb1bd1-07a7-c44d-8c39-860fa5862ab4
Ancestors: MorphicTests-nice.24

Tests added for Morphic-mt.721

=============== 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 Squeak-dev mailing list