Revision 20bc5360 htest/Test/Ganeti/Query/Language.hs

b/htest/Test/Ganeti/Query/Language.hs
81 81

  
82 82
-- | Tests that serialisation/deserialisation of filters is
83 83
-- idempotent.
84
prop_Qlang_Serialisation :: Property
85
prop_Qlang_Serialisation =
84
prop_Serialisation :: Property
85
prop_Serialisation =
86 86
  forAll genFilter $ \flt ->
87 87
  J.readJSON (J.showJSON flt) ==? J.Ok flt
88 88

  
89
prop_Qlang_FilterRegex_instances :: Qlang.FilterRegex -> Property
90
prop_Qlang_FilterRegex_instances rex =
89
prop_FilterRegex_instances :: Qlang.FilterRegex -> Property
90
prop_FilterRegex_instances rex =
91 91
  printTestCase "failed JSON encoding"
92 92
    (J.readJSON (J.showJSON rex) ==? J.Ok rex) .&&.
93 93
  printTestCase "failed read/show instances" (read (show rex) ==? rex)
94 94

  
95 95
testSuite "Qlang"
96
  [ 'prop_Qlang_Serialisation
97
  , 'prop_Qlang_FilterRegex_instances
96
  [ 'prop_Serialisation
97
  , 'prop_FilterRegex_instances
98 98
  ]

Also available in: Unified diff