[squeak-dev] The Trunk: KernelTests-nice.218.mcz

commits at source.squeak.org commits at source.squeak.org
Fri May 11 21:09:25 UTC 2012


Nicolas Cellier uploaded a new version of KernelTests to project The Trunk:
http://source.squeak.org/trunk/KernelTests-nice.218.mcz

==================== Summary ====================

Name: KernelTests-nice.218
Author: nice
Time: 11 May 2012, 11:08:59.23 pm
UUID: 6973b614-5fec-4379-ae8e-2c6085f513e5
Ancestors: KernelTests-eem.217, KernelTests-pad.210

Merge and improve hash tests from pad.210

=============== Diff against KernelTests-eem.217 ===============

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
+ 	| date0 date1 date2 |
+ 	date0 := DateAndTime unixEpoch.
+ 	date1 := DateAndTime new ticks: (date0 + 1 hours) ticks offset: 0 hours.
+ 	date2 := DateAndTime new ticks: (date0 - 2 hours) ticks offset: -3 hours.
+ 	self assert: (date1 = date2) ==> [date1 hash = date2 hash]!

Item was changed:
  ClassTestCase subclass: #TimespanTest
+ 	instanceVariableNames: 'timespan aTimespan anOverlappingTimespan anIncludedTimespan aDisjointTimespan aDay aWeek dec31 jan01 jan08 localTimeZoneToRestore anEqualTimeSpan'
- 	instanceVariableNames: 'timespan aTimespan anOverlappingTimespan anIncludedTimespan aDisjointTimespan aDay aWeek dec31 jan01 jan08 localTimeZoneToRestore'
  	classVariableNames: ''
  	poolDictionaries: ''
  	category: 'KernelTests-Chronology'!

Item was changed:
  ----- Method: TimespanTest>>setUp (in category 'Running') -----
  setUp
  
+ 	| jan01HereSomeWhereElseOnEarth |
  	localTimeZoneToRestore := DateAndTime localTimeZone.
  	DateAndTime localTimeZone: TimeZone default.
  
  	"100 hours starting noon 22 March 2003"
  	timespan := Timespan starting:
  					(DateAndTime year: 2003 month: 03 day: 22 hour: 12 minute: 0 second: 0)
  						duration: (Duration hours: 100).
  
  	dec31 := (DateAndTime year: 2004 month: 12 day: 31 hour: 0 minute: 0 second: 0).
  	jan01 := (DateAndTime year: 2005 month: 1 day: 1 hour: 0 minute: 0 second: 0).
  	jan08 := (DateAndTime year: 2005 month: 1 day: 8 hour: 0 minute: 0 second:0).
  	aDay := Duration days: 1 hours: 0 minutes: 0 seconds: 0 nanoSeconds: 0.
  	aWeek := Duration days: 7 hours: 0 minutes: 0 seconds: 0 nanoSeconds: 0.
  	aTimespan := Timespan starting: jan01 duration: aWeek.
+ 	jan01HereSomeWhereElseOnEarth := DateAndTime new ticks: (jan01 + 3 hours) ticks offset: jan01 offset + 3 hours.
+ 	anEqualTimeSpan := Timespan starting: jan01HereSomeWhereElseOnEarth asUTC duration: aWeek.
  	anOverlappingTimespan := Timespan starting: dec31 duration: aWeek.
  	anIncludedTimespan := Timespan starting: jan01 duration: aDay.
  	aDisjointTimespan := Timespan starting: jan08 duration: aWeek.
  
  
  
  !

Item was changed:
  ----- Method: TimespanTest>>testHash (in category 'testing') -----
  testHash
+ 	self assert: (aTimespan = anEqualTimeSpan) ==> [aTimespan hash = anEqualTimeSpan hash]!
- 	self assert: aTimespan hash =     101198424
- 	"must be a more meaningful test?"!



More information about the Squeak-dev mailing list