Copyright | © 2018-2020 IOHK |
---|---|
License | Apache-2.0 |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Test.Utils.Time
Description
Provides utility functions relating to testing with times and dates.
Synopsis
- data UniformTime
- genUniformTime :: Gen UTCTime
- genUniformTimeWithinRange :: Day -> Day -> Gen UTCTime
- getUniformTime :: UniformTime -> UTCTime
Documentation
data UniformTime Source #
A wrapper for UTCTime
whose Arbitrary
instance spans a uniform range
of dates and a mixture of time precisions.
Instances
Eq UniformTime Source # | |
Defined in Test.Utils.Time | |
Ord UniformTime Source # | |
Defined in Test.Utils.Time Methods compare :: UniformTime -> UniformTime -> Ordering # (<) :: UniformTime -> UniformTime -> Bool # (<=) :: UniformTime -> UniformTime -> Bool # (>) :: UniformTime -> UniformTime -> Bool # (>=) :: UniformTime -> UniformTime -> Bool # max :: UniformTime -> UniformTime -> UniformTime # min :: UniformTime -> UniformTime -> UniformTime # | |
Show UniformTime Source # | |
Defined in Test.Utils.Time Methods showsPrec :: Int -> UniformTime -> ShowS # show :: UniformTime -> String # showList :: [UniformTime] -> ShowS # | |
Arbitrary UniformTime Source # | |
Defined in Test.Utils.Time |
genUniformTime :: Gen UTCTime Source #
Generate UTCTime
values over a uniform range of dates and a mixture of
time precisions.
Dates will be generated in a range that's bounded by defaultLowerBound
and
defaultUpperBound
.
genUniformTimeWithinRange :: Day -> Day -> Gen UTCTime Source #
Generate UTCTime
values over a uniform range of dates and a mixture of
time precisions.
Dates will be generated in a range that's bounded by the given minimum and maximum Julian day arguments.
getUniformTime :: UniformTime -> UTCTime Source #