[squeak-dev] The Trunk: KernelTests-cmm.198.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Aug 16 02:55:16 UTC 2011


Chris Muller uploaded a new version of KernelTests to project The Trunk:
http://source.squeak.org/trunk/KernelTests-cmm.198.mcz

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

Name: KernelTests-cmm.198
Author: cmm
Time: 15 August 2011, 9:30:58.161 pm
UUID: 64f23ad0-eb40-407d-90e6-6e45a2b5611e
Ancestors: KernelTests-nice.197

- Test for #makeUTC.

=============== Diff against KernelTests-nice.197 ===============

Item was removed:
- ----- 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] !

Item was added:
+ ----- Method: DateTest>>testMakeUTC (in category 'testing') -----
+ testMakeUTC
+ 	"Equal dates should compare equal regardless of which TimeZone
+ 	they are created in."
+ 	| priorTz march31stLocal march31stOcean |
+ 	"This test won't work in GMT-9, but nobody lives there."
+ 	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 makeUTC = march31stOcean makeUTC ;
+ 		 deny: march31stOcean makeUTC > march31stLocal makeUTC ;
+ 		 deny: march31stOcean makeUTC < march31stLocal makeUTC!




More information about the Squeak-dev mailing list