Skip to content

Commit

Permalink
Test for #207.
Browse files Browse the repository at this point in the history
  • Loading branch information
AshleyYakeley committed May 3, 2022
1 parent d2df4dc commit 92caf62
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/main/Test/Format/ParseTime.hs
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,9 @@ prop_read_show_ZonedUTC t = compareResult (Just $ zonedTimeToUTC t) (readMaybe (
prop_read_show_LocalUTC :: LocalTime -> Result
prop_read_show_LocalUTC t = compareResult (Just $ localTimeToUTC utc t) (readMaybe (show t))

prop_read_show_UTC_no_TZ :: UTCTime -> Result
prop_read_show_UTC_no_TZ t = compareResult (Just t) $ readMaybe $ show $ utcToLocalTime utc t

--

-- * special show functions
Expand Down Expand Up @@ -620,6 +623,7 @@ readShowTests =
, nameTest "UTCTime" (prop_read_show :: UTCTime -> Result)
, nameTest "UTCTime (zoned)" prop_read_show_ZonedUTC
, nameTest "UTCTime (local)" prop_read_show_LocalUTC
, nameTest "UTCTime (no TZ)" prop_read_show_UTC_no_TZ
, nameTest "UniversalTime" (prop_read_show :: UniversalTime -> Result)
, nameTest "NominalDiffTime" (prop_read_show :: NominalDiffTime -> Result)
, nameTest "DiffTime" (prop_read_show :: DiffTime -> Result)
Expand Down

0 comments on commit 92caf62

Please sign in to comment.