[squeak-dev] The Inbox: BalloonTests-egp.2.mcz

commits at source.squeak.org commits at source.squeak.org
Sun Mar 6 20:52:12 UTC 2011

A new version of BalloonTests was added to project The Inbox:

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

Name: BalloonTests-egp.2
Author: egp
Time: 6 March 2011, 3:52:10.157 pm
UUID: a8206c39-12ee-4222-a29a-caa537e037c4
Ancestors: BalloonTests-egp.1

Test of the GradientFillStyle LRUCache false hits bug.

==================== Snapshot ====================

SystemOrganization addCategory: #'BalloonTests-Fills'!

ClassTestCase subclass: #GradientFillStyleTest
	instanceVariableNames: ''
	classVariableNames: ''
	poolDictionaries: ''
	category: 'BalloonTests-Fills'!

!GradientFillStyleTest commentStamp: 'egp 3/6/2011 15:10' prior: 0!
This tests the LRUCache operation.!

----- Method: GradientFillStyleTest>>testLRUCacheHits (in category 'tests') -----

	| gradient greenWhiteRamp redWhiteRamp |
	"This test proves the bug fix where modifing the LRUCache key resulted in false 
	cache hits. The affect was that a gradient could not be modifed from the user interface."
	GradientFillStyle cleanUp.
	gradient := GradientFillStyle new colorRamp: {0.0->Color red. 1.0->Color white}. 
	redWhiteRamp := gradient pixelRamp. 
	"Change the first color in colorRamp"
      gradient firstColor: Color green forMorph: nil hand: nil. 
	greenWhiteRamp := gradient pixelRamp.

	"Ensure the pixelRamp has changed"
        self assert: (redWhiteRamp ~= greenWhiteRamp).!

More information about the Squeak-dev mailing list