The Trunk: KernelTests-nice.264.mcz

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

The Trunk: KernelTests-nice.264.mcz

commits-2
Nicolas Cellier uploaded a new version of KernelTests to project The Trunk:
http://source.squeak.org/trunk/KernelTests-nice.264.mcz

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

Name: KernelTests-nice.264
Author: nice
Time: 21 March 2014, 6:40:48.635 pm
UUID: e99bef3c-6fa7-8d4f-b491-f9ef0f98ed63
Ancestors: KernelTests-nice.263

A non regression test for just found sqrtFloor bug.

=============== Diff against KernelTests-nice.263 ===============

Item was added:
+ ----- Method: LargePositiveIntegerTest>>testLargeSqrtFloor (in category 'tests') -----
+ testLargeSqrtFloor
+ "This test fails if a careless implementation naivly factors out the power of two (remove the trailing zeroes up to lowBit).
+ This was the case in a previous Squeak 4.x implementation."
+
+ | large root |
+ large := (SmallInteger maxVal << 100 + 1) << 100.
+ root := large sqrtFloor.
+ self assert: root squared <= large.
+ self assert: (root+1) squared > large.!