Nicolas Cellier uploaded a new version of KernelTests to project The Trunk: http://source.squeak.org/trunk/KernelTests-nice.214.mcz
==================== Summary ====================
Name: KernelTests-nice.214 Author: nice Time: 3 March 2012, 3:22:15.752 pm UUID: 9f9a6dfc-5949-414f-aaeb-99d26e27111c Ancestors: KernelTests-ul.213
Add RandomTest>>testWellKnownSequence This is to replace Random>>theItsCompletelyBrokenTest.
=============== Diff against KernelTests-ul.213 ===============
Item was added: + ----- Method: RandomTest>>testWellKnownSequence (in category 'tests') ----- + testWellKnownSequence + "This test assert the immutability of Random generation algorithm. + It uses Float equality tests, which is a very strict notion of immutability. + Anyone changing Random algorithm will have to adapt this test." + + | theSeedOfWellKnownSequence wellKnownSequence rng effectiveSequence | + theSeedOfWellKnownSequence := 2345678901. + wellKnownSequence := #(0.14924326965084453 0.3316330217437972 0.7561964480002394 0.3937015400238808 0.9417831813645471 0.5499291939427746 0.6599625962134277 0.991354559078512 0.6960744325518955 0.922987899707159 ). + rng := Random new. + rng seed: theSeedOfWellKnownSequence. + effectiveSequence := (1 to: 10) collect: [:i | rng next ]. + self assert: effectiveSequence equals: wellKnownSequence!
packages@lists.squeakfoundation.org