Levente Uzonyi uploaded a new version of KernelTests to project The Trunk: http://source.squeak.org/trunk/KernelTests-ul.213.mcz
==================== Summary ====================
Name: KernelTests-ul.213 Author: ul Time: 23 January 2012, 3:22:22.122 am UUID: 15536b29-64a8-7343-8668-bce592e0c78b Ancestors: KernelTests-nice.212
- Fixed and enhanced IntegerTest >> #testIsPowerOfTwo. - Removed IntegerTest >> #testIsPowerOfTwoM6873, because #testIsPowerOfTwo now includes the same checks.
=============== Diff against KernelTests-nice.212 ===============
Item was changed: ----- Method: IntegerTest>>testIsPowerOfTwo (in category 'tests - basic') ----- testIsPowerOfTwo
+ | powersOfTwo nonPowersOfTwo | + powersOfTwo := (0 to: 100) collect: [ :each | + 2 raisedTo: each ]. + nonPowersOfTwo := (powersOfTwo collect: [ :each | each negated ]), + #(0 3 -3 5 -5 6 -6 7 -7 9 -9 10 -10 100 -100 1000 -1000 12345678 -12345678 1234567890 -1234567890 12345678901234567890 -12345678901234567890). + powersOfTwo do: [ :each | + self assert: each isPowerOfTwo ]. + nonPowersOfTwo do: [ :each | + self deny: each isPowerOfTwo ]! - self assert: (0 isPowerOfTwo). - self assert: (1 isPowerOfTwo). - self assert: (2 isPowerOfTwo). - self deny: (3 isPowerOfTwo). - self assert: (4 isPowerOfTwo). - !
Item was removed: - ----- Method: IntegerTest>>testIsPowerOfTwoM6873 (in category 'tests - basic') ----- - testIsPowerOfTwoM6873 - "This is a non regression test for http://bugs.squeak.org/view.php?id=6873" - - self deny: ((1 to: 80) anySatisfy: [:n | (2 raisedTo: n) negated isPowerOfTwo]) - description: 'A negative integer cannot be a power of two'.!
packages@lists.squeakfoundation.org