[squeak-dev] The Trunk: KernelTests-nice.271.mcz
commits at source.squeak.org
commits at source.squeak.org
Wed May 21 01:34:51 UTC 2014
Nicolas Cellier uploaded a new version of KernelTests to project The Trunk:
http://source.squeak.org/trunk/KernelTests-nice.271.mcz
==================== Summary ====================
Name: KernelTests-nice.271
Author: nice
Time: 21 May 2014, 3:34:22.392 am
UUID: c4e6812d-6155-4184-9b0a-68be1ee77edc
Ancestors: KernelTests-nice.270
Test isAnExactFloat.
=============== Diff against KernelTests-nice.270 ===============
Item was added:
+ ----- Method: FloatTest>>testFractionAsExactFloat (in category 'testing - conversion') -----
+ testFractionAsExactFloat
+ {
+ 1/2.
+ 1<<Float precision - 1 / (1 << 8).
+ Float fminNormalized asFraction.
+ Float fmin asFraction * 3.
+ Float fmin asFraction.
+ }
+ do: [:f | self assert: f asExactFloat equals: f asFloat]!
Item was added:
+ ----- Method: FloatTest>>testFractionIsAnExactFloat (in category 'testing - conversion') -----
+ testFractionIsAnExactFloat
+ self assert: (1/2) isAnExactFloat.
+ self assert: (1<<Float precision - 1 / (1 << 8)) isAnExactFloat.
+ self assert: (Float fmin asFraction * 3) isAnExactFloat.
+ self assert: Float fmin asFraction isAnExactFloat.
+ self deny: (Float fmin asFraction / 2) isAnExactFloat.
+ self deny: (Float fmin asFraction * 3 / 2) isAnExactFloat.
+ self deny: (1 / 3) isAnExactFloat.
+ self deny: (1<<Float precision + 1 / 2) isAnExactFloat.!
Item was added:
+ ----- Method: FloatTest>>testLargeIntegerIsAnExactFloat (in category 'testing - conversion') -----
+ testLargeIntegerIsAnExactFloat
+ self assert: Float fmax asInteger isAnExactFloat.
+ self deny: (Float fmax asInteger + (Float fmax ulp / 2) asInteger) isAnExactFloat.
+ self deny: (Float fmax asInteger * 2) isAnExactFloat!
More information about the Squeak-dev
mailing list
|