Revision b69be409 htools/Ganeti/HTools/QC.hs
b/htools/Ganeti/HTools/QC.hs | ||
---|---|---|
55 | 55 |
import qualified Ganeti.HTools.ExtLoader |
56 | 56 |
import qualified Ganeti.HTools.IAlloc as IAlloc |
57 | 57 |
import qualified Ganeti.HTools.Instance as Instance |
58 |
import qualified Ganeti.HTools.JSON as JSON |
|
58 | 59 |
import qualified Ganeti.HTools.Loader as Loader |
59 | 60 |
import qualified Ganeti.HTools.Luxi |
60 | 61 |
import qualified Ganeti.HTools.Node as Node |
... | ... | |
313 | 314 |
-- value. |
314 | 315 |
prop_Utils_fromObjWithDefault def_value random_key = |
315 | 316 |
-- a missing key will be returned with the default |
316 |
Utils.fromObjWithDefault [] random_key def_value == Just def_value &&
|
|
317 |
JSON.fromObjWithDefault [] random_key def_value == Just def_value &&
|
|
317 | 318 |
-- a found key will be returned as is, not with default |
318 |
Utils.fromObjWithDefault [(random_key, J.showJSON def_value)]
|
|
319 |
JSON.fromObjWithDefault [(random_key, J.showJSON def_value)]
|
|
319 | 320 |
random_key (def_value+1) == Just def_value |
320 | 321 |
where _types = def_value :: Integer |
321 | 322 |
|
Also available in: Unified diff