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 = String -> Spec -> Spec forall a. HasCallStack => String -> SpecWith a -> SpecWith a Hspec.describe String "Saturn.Unstable.Extra.Time" (Spec -> Spec) -> Spec -> Spec forall a b. (a -> b) -> a -> b $ do String -> Spec -> Spec forall a. HasCallStack => String -> SpecWith a -> SpecWith a Hspec.describe String "dayOfWeekToWord8" (Spec -> Spec) -> Spec -> Spec forall a b. (a -> b) -> a -> b $ do String -> Expectation -> SpecWith (Arg Expectation) forall a. (HasCallStack, Example a) => String -> a -> SpecWith (Arg a) Hspec.it String "works with Sunday" (Expectation -> SpecWith (Arg Expectation)) -> Expectation -> SpecWith (Arg Expectation) forall a b. (a -> b) -> a -> b $ do DayOfWeek -> Word8 Time.dayOfWeekToWord8 DayOfWeek Time.Sunday Word8 -> Word8 -> Expectation forall a. (HasCallStack, Show a, Eq a) => a -> a -> Expectation `Hspec.shouldBe` Word8 0 String -> Expectation -> SpecWith (Arg Expectation) forall a. (HasCallStack, Example a) => String -> a -> SpecWith (Arg a) Hspec.it String "works with Monday" (Expectation -> SpecWith (Arg Expectation)) -> Expectation -> SpecWith (Arg Expectation) forall a b. (a -> b) -> a -> b $ do DayOfWeek -> Word8 Time.dayOfWeekToWord8 DayOfWeek Time.Monday Word8 -> Word8 -> Expectation forall a. (HasCallStack, Show a, Eq a) => a -> a -> Expectation `Hspec.shouldBe` Word8 1 String -> Expectation -> SpecWith (Arg Expectation) forall a. (HasCallStack, Example a) => String -> a -> SpecWith (Arg a) Hspec.it String "works with Tuesday" (Expectation -> SpecWith (Arg Expectation)) -> Expectation -> SpecWith (Arg Expectation) forall a b. (a -> b) -> a -> b $ do DayOfWeek -> Word8 Time.dayOfWeekToWord8 DayOfWeek Time.Tuesday Word8 -> Word8 -> Expectation forall a. (HasCallStack, Show a, Eq a) => a -> a -> Expectation `Hspec.shouldBe` Word8 2 String -> Expectation -> SpecWith (Arg Expectation) forall a. (HasCallStack, Example a) => String -> a -> SpecWith (Arg a) Hspec.it String "works with Wednesday" (Expectation -> SpecWith (Arg Expectation)) -> Expectation -> SpecWith (Arg Expectation) forall a b. (a -> b) -> a -> b $ do DayOfWeek -> Word8 Time.dayOfWeekToWord8 DayOfWeek Time.Wednesday Word8 -> Word8 -> Expectation forall a. (HasCallStack, Show a, Eq a) => a -> a -> Expectation `Hspec.shouldBe` Word8 3 String -> Expectation -> SpecWith (Arg Expectation) forall a. (HasCallStack, Example a) => String -> a -> SpecWith (Arg a) Hspec.it String "works with Thursday" (Expectation -> SpecWith (Arg Expectation)) -> Expectation -> SpecWith (Arg Expectation) forall a b. (a -> b) -> a -> b $ do DayOfWeek -> Word8 Time.dayOfWeekToWord8 DayOfWeek Time.Thursday Word8 -> Word8 -> Expectation forall a. (HasCallStack, Show a, Eq a) => a -> a -> Expectation `Hspec.shouldBe` Word8 4 String -> Expectation -> SpecWith (Arg Expectation) forall a. (HasCallStack, Example a) => String -> a -> SpecWith (Arg a) Hspec.it String "works with Friday" (Expectation -> SpecWith (Arg Expectation)) -> Expectation -> SpecWith (Arg Expectation) forall a b. (a -> b) -> a -> b $ do DayOfWeek -> Word8 Time.dayOfWeekToWord8 DayOfWeek Time.Friday Word8 -> Word8 -> Expectation forall a. (HasCallStack, Show a, Eq a) => a -> a -> Expectation `Hspec.shouldBe` Word8 5 String -> Expectation -> SpecWith (Arg Expectation) forall a. (HasCallStack, Example a) => String -> a -> SpecWith (Arg a) Hspec.it String "works with Saturday" (Expectation -> SpecWith (Arg Expectation)) -> Expectation -> SpecWith (Arg Expectation) forall a b. (a -> b) -> a -> b $ do DayOfWeek -> Word8 Time.dayOfWeekToWord8 DayOfWeek Time.Saturday Word8 -> Word8 -> Expectation forall a. (HasCallStack, Show a, Eq a) => a -> a -> Expectation `Hspec.shouldBe` Word8 6