Revision dde8b625 test/hs/Test/Ganeti/Types.hs
b/test/hs/Test/Ganeti/Types.hs | ||
---|---|---|
37 | 37 |
, JobId(..) |
38 | 38 |
) where |
39 | 39 |
|
40 |
import Control.Applicative |
|
41 |
import System.Time (ClockTime(..)) |
|
42 |
|
|
40 | 43 |
import Test.QuickCheck as QuickCheck hiding (Result) |
41 | 44 |
import Test.HUnit |
42 | 45 |
import qualified Text.JSON as J |
... | ... | |
54 | 57 |
|
55 | 58 |
-- * Arbitrary instance |
56 | 59 |
|
60 |
instance Arbitrary ClockTime where |
|
61 |
arbitrary = TOD <$> arbitrary <*> fmap (`mod` (10^(12::Int))) arbitrary |
|
62 |
|
|
57 | 63 |
instance (Arbitrary a, Ord a, Num a, Show a) => |
58 | 64 |
Arbitrary (Types.Positive a) where |
59 | 65 |
arbitrary = do |
Also available in: Unified diff