module Saturn.Unstable.Extra.TimeSpec where import qualified Data.Time as Time import qualified Saturn.Unstable.Extra.Time as Time import qualified Test.Hspec as Hspec spec :: Hspec.Spec spec :: Spec spec = forall a. HasCallStack => String -> SpecWith a -> SpecWith a Hspec.describe String "Saturn.Unstable.Extra.Time" forall a b. (a -> b) -> a -> b $ do forall a. HasCallStack => String -> SpecWith a -> SpecWith a Hspec.describe String "dayOfWeekToWord8" forall a b. (a -> b) -> a -> b $ do forall a. (HasCallStack, Example a) => String -> a -> SpecWith (Arg a) Hspec.it String "works with Sunday" forall a b. (a -> b) -> a -> b $ do DayOfWeek -> Word8 Time.dayOfWeekToWord8 DayOfWeek Time.Sunday forall a. (HasCallStack, Show a, Eq a) => a -> a -> Expectation `Hspec.shouldBe` Word8 0 forall a. (HasCallStack, Example a) => String -> a -> SpecWith (Arg a) Hspec.it String "works with Monday" forall a b. (a -> b) -> a -> b $ do DayOfWeek -> Word8 Time.dayOfWeekToWord8 DayOfWeek Time.Monday forall a. (HasCallStack, Show a, Eq a) => a -> a -> Expectation `Hspec.shouldBe` Word8 1 forall a. (HasCallStack, Example a) => String -> a -> SpecWith (Arg a) Hspec.it String "works with Tuesday" forall a b. (a -> b) -> a -> b $ do DayOfWeek -> Word8 Time.dayOfWeekToWord8 DayOfWeek Time.Tuesday forall a. (HasCallStack, Show a, Eq a) => a -> a -> Expectation `Hspec.shouldBe` Word8 2 forall a. (HasCallStack, Example a) => String -> a -> SpecWith (Arg a) Hspec.it String "works with Wednesday" forall a b. (a -> b) -> a -> b $ do DayOfWeek -> Word8 Time.dayOfWeekToWord8 DayOfWeek Time.Wednesday forall a. (HasCallStack, Show a, Eq a) => a -> a -> Expectation `Hspec.shouldBe` Word8 3 forall a. (HasCallStack, Example a) => String -> a -> SpecWith (Arg a) Hspec.it String "works with Thursday" forall a b. (a -> b) -> a -> b $ do DayOfWeek -> Word8 Time.dayOfWeekToWord8 DayOfWeek Time.Thursday forall a. (HasCallStack, Show a, Eq a) => a -> a -> Expectation `Hspec.shouldBe` Word8 4 forall a. (HasCallStack, Example a) => String -> a -> SpecWith (Arg a) Hspec.it String "works with Friday" forall a b. (a -> b) -> a -> b $ do DayOfWeek -> Word8 Time.dayOfWeekToWord8 DayOfWeek Time.Friday forall a. (HasCallStack, Show a, Eq a) => a -> a -> Expectation `Hspec.shouldBe` Word8 5 forall a. (HasCallStack, Example a) => String -> a -> SpecWith (Arg a) Hspec.it String "works with Saturday" forall a b. (a -> b) -> a -> b $ do DayOfWeek -> Word8 Time.dayOfWeekToWord8 DayOfWeek Time.Saturday forall a. (HasCallStack, Show a, Eq a) => a -> a -> Expectation `Hspec.shouldBe` Word8 6