Revision c65621d7 htest/Test/Ganeti/Types.hs
b/htest/Test/Ganeti/Types.hs | ||
---|---|---|
56 | 56 |
(QuickCheck.Positive i) <- arbitrary |
57 | 57 |
Types.mkPositive i |
58 | 58 |
|
59 |
instance (Arbitrary a) => Arbitrary (Types.NonEmpty a) where |
|
60 |
arbitrary = do |
|
61 |
QuickCheck.NonEmpty lst <- arbitrary |
|
62 |
Types.mkNonEmpty lst |
|
63 |
|
|
59 | 64 |
$(genArbitrary ''AllocPolicy) |
60 | 65 |
|
61 | 66 |
$(genArbitrary ''DiskTemplate) |
... | ... | |
78 | 83 |
|
79 | 84 |
$(genArbitrary ''NodeEvacMode) |
80 | 85 |
|
81 |
instance (Arbitrary a) => Arbitrary (Types.NonEmpty a) where |
|
82 |
arbitrary = do |
|
83 |
QuickCheck.NonEmpty lst <- arbitrary |
|
84 |
Types.mkNonEmpty lst |
|
86 |
$(genArbitrary ''FileDriver) |
|
85 | 87 |
|
86 | 88 |
-- * Properties |
87 | 89 |
|
... | ... | |
176 | 178 |
prop_NodeEvacMode_serialisation :: NodeEvacMode -> Property |
177 | 179 |
prop_NodeEvacMode_serialisation = testSerialisation |
178 | 180 |
|
181 |
-- | Test 'FileDriver' serialisation. |
|
182 |
prop_FileDriver_serialisation :: FileDriver -> Property |
|
183 |
prop_FileDriver_serialisation = testSerialisation |
|
184 |
|
|
179 | 185 |
testSuite "Types" |
180 | 186 |
[ 'prop_AllocPolicy_serialisation |
181 | 187 |
, 'prop_DiskTemplate_serialisation |
... | ... | |
195 | 201 |
, 'prop_OobCommand_serialisation |
196 | 202 |
, 'prop_StorageType_serialisation |
197 | 203 |
, 'prop_NodeEvacMode_serialisation |
204 |
, 'prop_FileDriver_serialisation |
|
198 | 205 |
] |
Also available in: Unified diff