class: RegressionTests::TimeAndDateTest
authorClaus Gittinger <cg@exept.de>
Mon, 05 Nov 2012 20:04:50 +0100
changeset 745 fde865b5dece
parent 744 51796cc73948
child 746 4ac3ed420d3e
class: RegressionTests::TimeAndDateTest added: #test_04_calenderWeek_fails changed: #test_03_calenderWeek
RegressionTests__TimeAndDateTest.st
--- a/RegressionTests__TimeAndDateTest.st	Mon Nov 05 18:59:17 2012 +0100
+++ b/RegressionTests__TimeAndDateTest.st	Mon Nov 05 20:04:50 2012 +0100
@@ -142,9 +142,31 @@
 
     self assert:(Date newDay:5 month:1 year:2015) weekInYear == 2.
 
+    "/ every 4th of january is in the 1st week
+    1902 to:2100 do:[:y |
+        |d|
+        d := Date newDay:4 month:1 year:y.
+        self assert:d weekInYear == 1.
+    ].
+
     "
      self new test_03_calenderWeek
     "
+!
+
+test_04_calenderWeek_fails
+    <test: broken>
+^ self.
+    "/ currently fails for date before 1901
+    1900 to:1905 do:[:y |
+        |d|
+        d := Date newDay:4 month:1 year:y.
+        self assert:d weekInYear == 1.
+    ].
+
+    "
+     self new test_04_calenderWeek_fails
+    "
 ! !
 
 !TimeAndDateTest class methodsFor:'documentation'!