Squeak 4.6: BalloonTests-egp.2.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Squeak 4.6: BalloonTests-egp.2.mcz

commits-2
Chris Muller uploaded a new version of BalloonTests to project Squeak 4.6:
http://source.squeak.org/squeak46/BalloonTests-egp.2.mcz

==================== 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') -----
testLRUCacheHits

        | 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).!