[squeak-dev] The Trunk: KernelTests-cmm.196.mcz
commits at source.squeak.org
commits at source.squeak.org
Wed Jul 6 02:52:12 UTC 2011
Chris Muller uploaded a new version of KernelTests to project The Trunk:
http://source.squeak.org/trunk/KernelTests-cmm.196.mcz
==================== Summary ====================
Name: KernelTests-cmm.196
Author: cmm
Time: 5 July 2011, 9:51:55.804 pm
UUID: a919bc01-7de6-4a3b-a78d-5cae16db7c08
Ancestors: KernelTests-bf.195
Added test to compare Dates created in different TimeZones.
=============== Diff against KernelTests-bf.195 ===============
Item was added:
+ ----- Method: DateTest>>testFromDifferentTimeZones (in category 'testing') -----
+ testFromDifferentTimeZones
+ "Equal dates should compare equal regardless of which TimeZone they are created in."
+ | priorTz march31stLocal march31stOcean |
+ self deny: DateAndTime localTimeZone offset hours = -9.
+ priorTz := DateAndTime localTimeZone.
+ march31stLocal := Date today.
+ DateAndTime
+ localTimeZone: (TimeZone
+ offset: -9 hours
+ name: 'No Countries'
+ abbreviation: 'Ocean').
+ march31stOcean := Date today.
+ DateAndTime localTimeZone: priorTz.
+ self assert: march31stLocal = march31stOcean.
+ DateAndTime localTimeZone offset hours > -9
+ ifTrue: [self deny: march31stOcean > march31stLocal]
+ ifFalse: [self deny: march31stOcean > march31stLocal] !
More information about the Squeak-dev
mailing list
|