DateAndTime hash was: Re: [squeak-dev] true hash

Randal L. Schwartz merlyn at stonehenge.com
Thu May 10 22:15:07 UTC 2012


>>>>> "Nicolas" == Nicolas Cellier <nicolas.cellier.aka.nice at gmail.com> writes:

Nicolas> Sorry to duplicate but it breaks this test
Nicolas> | date1 date2 |
Nicolas> date1 := DateAndTime new ticks: (DateAndTime unixEpoch + 1 hours)
Nicolas> ticks offset: 0 hours.
Nicolas> date2 := DateAndTime new ticks: (DateAndTime unixEpoch - 2 hours)
Nicolas> ticks offset: -3 hours.
Nicolas> self assert: (date1 = date2) ==> [date1 hash = date2 hash]

Isn't that test broken?  What if the first and second call to unixEpoch
differ by one second?  Or is that handled in the assert?

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn at stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.posterous.com/ for Smalltalk discussion


More information about the Squeak-dev mailing list