[phylo] fix golden tests and date phylo tests

This is because I adjusted start time for date diff to be 0001-01-01
instead of 0000-00-00.
parent 5446b7f8
Pipeline #7840 failed with stages
in 37 minutes and 24 seconds
This diff is collapsed.
......@@ -23,13 +23,13 @@ test :: Spec
test = do
describe "phylo tools works" $ do
it "toMonths works" $ do
toMonths 2025 1 1 `shouldBe` 24300
toMonths 2025 2 1 `shouldBe` 24301
toMonths 2025 4 1 `shouldBe` 24303
toMonths 2025 1 1 `shouldBe` 24288
toMonths 2025 2 1 `shouldBe` 24289
toMonths 2025 4 1 `shouldBe` 24291
it "toDays works" $ do
toDays 2025 1 1 `shouldBe` 739617
toDays 2025 1 2 `shouldBe` 739618
toDays 2025 1 4 `shouldBe` 739620
toDays 2025 1 1 `shouldBe` 739251
toDays 2025 1 2 `shouldBe` 739252
toDays 2025 1 4 `shouldBe` 739254
it "toHours works" $ do
toHours (UTCTimeR { year = 2025, month = 1, day = 1, hour = 0, minute = 0, sec = 0 }) `shouldBe` 17742024
toHours (UTCTimeR { year = 2025, month = 1, day = 1, hour = 1, minute = 0, sec = 0 }) `shouldBe` 17742025
......
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE TypeApplications #-}
module Test.Offline.Phylo (tests) where
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment