[squeak-dev] Units package

cdrick cdrick65 at gmail.com
Thu Jun 19 14:21:21 UTC 2008


>
> hash
>
>        ^value hash bitXor: self class hash
>
There, (60 units: #seconds) hash = (60 units: #meters) returns true
I'm not sure this could lead to problem but what about:

hash
	^value hash bitXor: unit hash

and

testEquality

	self deny: (60 units: #seconds) hash = (60 units: #meters) hash.
	self deny: (60 units: #seconds) = (60 units: #meters).
	self deny: (60 units: #seconds) hash = (1 units: #minutes) hash.
	self assert: (60 units: #seconds) = (1 units: #minutes).


Cédrick


More information about the Squeak-dev mailing list