Browse files

Update test case for QuickCheck 2.4 and 2012-07-01 leap second.

  • Loading branch information...
1 parent 69af548 commit 97f86fbd2745a75beec9e82c51ada1fb59a67783 @bjornbm committed Jan 8, 2012
Showing with 7 additions and 4 deletions.
  1. +7 −4 TestLeapSeconds.hs
View
11 TestLeapSeconds.hs
@@ -2,12 +2,15 @@ import Data.Time
import Data.Time.Clock.AnnouncedLeapSeconds
import Test.QuickCheck
-onceCheck = check (defaultConfig {configMaxTest = 1})
+onceCheck = quickCheckWith (stdArgs {maxSuccess = 1})
-- A few trivial tests.
main = do
onceCheck $ lst (fromGregorian 1111 12 31) == 0 -- Before first leap second.
- onceCheck $ lst (fromGregorian 2008 12 31) == 33 -- Prior to last leap second.
- onceCheck $ lst (fromGregorian 2009 01 01) == 34 -- Last leap second.
- onceCheck $ lst (fromGregorian 2009 12 31) == 34 -- Beyond last leap second.
+ onceCheck $ lst (fromGregorian 2008 12 31) == 33
+ onceCheck $ lst (fromGregorian 2009 01 01) == 34
+ onceCheck $ lst (fromGregorian 2009 12 31) == 34
+ onceCheck $ lst (fromGregorian 2012 06 30) == 34 -- Prior to last leap second.
+ onceCheck $ lst (fromGregorian 2012 07 01) == 35 -- Last leap second.
+ onceCheck $ lst (fromGregorian 2012 12 31) == 35 -- Beyond last leap second.

0 comments on commit 97f86fb

Please sign in to comment.