[squeak-dev] The Trunk: MorphicTests-mt.30.mcz

commits at source.squeak.org commits at source.squeak.org
Sat May 2 10:38:42 UTC 2015


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

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

Name: MorphicTests-mt.30
Author: mt
Time: 2 May 2015, 12:38:36.255 pm
UUID: 30f9a538-e3fa-034a-a612-123cf964e938
Ancestors: MorphicTests-mt.29

Tests added for pluggable text morphs.

=============== Diff against MorphicTests-mt.29 ===============

Item was added:
+ TestCase subclass: #PluggableTextMorphTest
+ 	instanceVariableNames: 'widget model'
+ 	classVariableNames: ''
+ 	poolDictionaries: ''
+ 	category: 'MorphicTests-Widgets'!

Item was added:
+ ----- Method: PluggableTextMorphTest>>setUp (in category 'running') -----
+ setUp
+ 
+ 	super setUp.
+ 	
+ 	model := ValueHolder new contents: ''; yourself.
+ 	widget := PluggableTextMorph on: model text: #contents accept: #contents:.!

Item was added:
+ ----- Method: PluggableTextMorphTest>>test01TextChangeInModel (in category 'tests') -----
+ test01TextChangeInModel
+ 
+ 	model contents: 'Hello, World!!'.
+ 	self assert: model contents equals: widget text asString.!

Item was added:
+ ----- Method: PluggableTextMorphTest>>test02TextChangeInWidget (in category 'tests') -----
+ test02TextChangeInWidget
+ 
+ 	widget replaceSelectionWith: 'Hello, World!!'.
+ 	self assert: '' equals: model contents.
+ 	
+ 	widget accept.
+ 	self assert: widget text asString equals: model contents asString.!

Item was added:
+ ----- Method: PluggableTextMorphTest>>test03TriggerAcceptFromModel (in category 'tests') -----
+ test03TriggerAcceptFromModel
+ 
+ 	widget replaceSelectionWith: 'Hello, World!!'.
+ 	self assert: widget hasUnacceptedEdits.
+ 	
+ 	model changed: #acceptChanges.
+ 	self assert: widget text asString equals: model contents asString.!

Item was added:
+ ----- Method: PluggableTextMorphTest>>test04TriggerAcceptFromWidget (in category 'tests') -----
+ test04TriggerAcceptFromWidget
+ 
+ 	widget replaceSelectionWith: 'Hello, World!!'.
+ 	self assert: widget hasUnacceptedEdits.
+ 	
+ 	widget accept.
+ 	self assert: widget text asString equals: model contents asString.!



More information about the Squeak-dev mailing list