[squeak-dev] The Trunk: KernelTests-dtl.139.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Feb 15 04:11:40 UTC 2010

David T. Lewis uploaded a new version of KernelTests to project The Trunk:

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

Name: KernelTests-dtl.139
Author: dtl
Time: 14 February 2010, 11:08:47.856 pm
UUID: 57a641b3-bb2a-43da-9f55-b211ee83cb27
Ancestors: KernelTests-dtl.138

Remove last MVC/Morphic explicit dependency

=============== Diff against KernelTests-dtl.138 ===============

Item was changed:
  ----- Method: DependentsArrayTest>>testCanDiscardEdits (in category 'testing') -----
  	"self debug: #testCanDiscardEdits."
  	| anObject aView  |
  	anObject := Object new.
  	(Smalltalk hasClassNamed: #StringHolderView)
  		ifTrue: ["Use MVC view if available"
+ 			aView := (Smalltalk at: #StringHolderView) new
- 			aView := StringHolderView new
  				model: Transcript;
  				window: (0 at 0 extent: 60 at 60);
  				borderWidth: 1.]
  		ifFalse: ["Otherwise use a Morphic view"
+ 			aView := (Smalltalk at: #PluggableTextMorph) new model: Transcript].
- 			aView := PluggableTextMorph new model: Transcript].
  	self assert: aView notNil. "require either a StringHolderView or PluggableTextMorph"
  	aView := PluggableTextMorph new model: Transcript.
  	aView hasUnacceptedEdits: true.
  	anObject addDependent: Object new. "this entry should be garbage collected"
  	anObject addDependent: aView.
  	Smalltalk garbageCollect. "force garbage collection"
  		should: [anObject dependents size = 1]
  		description: 'first dependent of anObject should have been collected, second should not'.
  		shouldnt: [anObject canDiscardEdits]
  		description: 'anObject cannot discard edits because aView is a dependent of anObject and aView has unaccepted edits'.!

More information about the Squeak-dev mailing list