[squeak-dev] The Inbox: KernelTests-pad.210.mcz
commits at source.squeak.org
commits at source.squeak.org
Fri May 11 00:16:03 UTC 2012
A new version of KernelTests was added to project The Inbox:
http://source.squeak.org/inbox/KernelTests-pad.210.mcz
==================== Summary ====================
Name: KernelTests-pad.210
Author: pad
Time: 10 May 2012, 5:15:41.797 pm
UUID: 4ed47317-36b9-4777-9e44-591a5d72039b
Ancestors: KernelTests-nice.209
If Nicolas Cellier's new DateAndTime>>#hash is accepted then these tests need to be changed
DateAndTimeEpochTest>>#testHash
DateAndTimeLeapTest>>#testHash
TimespanTest>>#testHash
And I added the test he used to show how the other hash I proposed was suboptimal.
=============== Diff against KernelTests-nice.209 ===============
Item was changed:
----- Method: DateAndTimeEpochTest>>testHash (in category 'testing') -----
testHash
self assert: aDateAndTime hash = DateAndTime new hash.
+ self assert: aDateAndTime hash = 112557138
- self assert: aDateAndTime hash = 32161486
!
Item was changed:
----- Method: DateAndTimeLeapTest>>testHash (in category 'testing') -----
testHash
+ self assert: aDateAndTime hash = 16256473
- self assert: aDateAndTime hash = 131156085
!
Item was added:
+ ----- Method: DateAndTimeTest>>testHash (in category 'Tests') -----
+ testHash
+ | date1 date2 |
+ date1 := DateAndTime new ticks: (DateAndTime unixEpoch + 1 hours)
+ ticks offset: 0 hours.
+ date2 := DateAndTime new ticks: (DateAndTime unixEpoch - 2 hours)
+ ticks offset: -3 hours.
+ self assert: (date1 = date2) ==> [date1 hash = date2 hash]!
Item was changed:
----- Method: TimespanTest>>testHash (in category 'testing') -----
testHash
+ self assert: aTimespan hash = 259476428
- self assert: aTimespan hash = 101198424
"must be a more meaningful test?"!
More information about the Squeak-dev
mailing list
|