The Trunk: KernelTests-klc.161.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: KernelTests-klc.161.mcz

commits-2
Ken Causey uploaded a new version of KernelTests to project The Trunk:
http://source.squeak.org/trunk/KernelTests-klc.161.mcz

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

Name: KernelTests-klc.161
Author: klc
Time: 9 September 2010, 4:02:41.18 pm
UUID: 8de71510-96f6-4e4f-ae8e-14d6366acd33
Ancestors: KernelTests-nice.160

I hope I'm not making a mistake here.  It appears this test was failing simply because #printString was left out on 3 lines.  Otherwise the test seems to be assuming that DateAndTime instances should be equivalent to their printString values.

=============== Diff against KernelTests-nice.160 ===============

Item was changed:
  ----- Method: DateAndTimeTest>>testPrintString (in category 'Tests') -----
  testPrintString
 
  "(self new setTestSelector: #testPrintString) debug"
 
  | dt dtNoOffset |
  dt :=DateAndTime
  year: 2004
  month: 11
  day: 2
  hour: 14
  minute: 3
  second: 5
  nanoSecond: 12345
  offset: (Duration seconds: (5 * 3600)).
  self assert: dt printString = '2004-11-02T14:03:05.000012345+05:00'.
 
  self assert: ('2002-05-16T17:20:45.1+01:01' asDateAndTime printString = '2002-05-16T17:20:45.1+01:01').
  self assert: (' 2002-05-16T17:20:45.02+01:01' asDateAndTime printString = '2002-05-16T17:20:45.02+01:01').  
  self assert: ('2002-05-16T17:20:45.000000009+01:01' asDateAndTime printString =  '2002-05-16T17:20:45.000000009+01:01').
  self assert: ('2002-05-16T17:20:45+00:00' asDateAndTime printString = '2002-05-16T17:20:45+00:00' ).
  self assert: (' 2002-05-16T17:20:45+01:57' asDateAndTime printString = '2002-05-16T17:20:45+01:57').
+ self assert: (' 2002-05-16T17:20:45-02:34' asDateAndTime printString = '2002-05-16T17:20:45-02:34').
+ self assert: ('2002-05-16T17:20:45+00:00' asDateAndTime printString = '2002-05-16T17:20:45+00:00').
+ self assert: ('1997-04-26T01:02:03+01:02:3' asDateAndTime printString = '1997-04-26T01:02:03+01:02:3').
- self assert: (' 2002-05-16T17:20:45-02:34' asDateAndTime = '2002-05-16T17:20:45-02:34').
- self assert: ('2002-05-16T17:20:45+00:00' asDateAndTime = '2002-05-16T17:20:45+00:00').
- self assert: ('1997-04-26T01:02:03+01:02:3' asDateAndTime = '1997-04-26T01:02:03+01:02:3').
 
  "When no offset is provided, the local one is used"
  dtNoOffset := '2002-05-16T17:20' asDateAndTime.
  self assert: (('2002-05-16T17:20:00*' match: dtNoOffset printString) and: [dtNoOffset offset = DateAndTime localOffset]).
 
  !