[Pkg] The Trunk: KernelTests-nice.371.mcz

commits at source.squeak.org commits at source.squeak.org
Wed Sep 11 22:40:10 UTC 2019


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

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

Name: KernelTests-nice.371
Author: nice
Time: 12 September 2019, 12:40:06.373387 am
UUID: d7755239-e282-46b3-9a72-c91b4d386e70
Ancestors: KernelTests-nice.370

Add a testLargeNegativeIntegerAsFloat

asFloat shall preserve the sign
I made a mistake that went unnoticed due to lack of such test!

=============== Diff against KernelTests-nice.370 ===============

Item was added:
+ ----- Method: FloatTest>>testLargeNegativeIntegerAsFloat (in category 'tests - conversion') -----
+ testLargeNegativeIntegerAsFloat
+ 	"assert IEEE 754 round to nearest even mode is honoured"
+ 	
+ 	self assert: SmallInteger minVal asFloat negative.
+ 	self assert: SmallInteger minVal isAnExactFloat description: 'this test requires this condition. If not met, change the test'.
+ 	self assert: SmallInteger minVal equals: SmallInteger minVal asFloat. "this test requires integrity of negative SmallInteger asFloat"
+ 	self assert: SmallInteger minVal asFloat - 1.0 equals: (SmallInteger minVal - 1) asFloat "same for LargeNegativeInteger"
+ 	!



More information about the Packages mailing list