[Seaside] Grease testSeconds is failing in Squeak 4.3 and Pharo 1.4
nicolas cellier
nicolas.cellier.aka.nice at gmail.com
Sun Feb 19 23:35:51 UTC 2012
In all Smalltalk, (2/1) is automatically reduced to a canonical Integer
representation.
Nonetheless it is also a fraction.
1) Since all Integer are special kind of fraction and are polymorphic to
fraction in Squeak and Pharo (responds to numerator, denominator, fractionPart
etc...)
2) and since doing so both simplify and speed up some arithmetic code,
Squeak and Pharo (2 isFraction) now answer true.
One consequence is a failing Grease test (GRPlatformTest>>testSeconds)
self deny: Time now seconds isFraction.
The purpose is to test that no fractional seconds get returned.
I suggest rewriting:
self deny: (Time now seconds isKindOf: Fraction).
which should be fairly portable
Nicolas
More information about the seaside
mailing list