Revision 63b068c1 htest/Test/Ganeti/OpCodes.hs

b/htest/Test/Ganeti/OpCodes.hs
74 74

  
75 75
-- | Check that opcode serialization is idempotent.
76 76
prop_serialization :: OpCodes.OpCode -> Property
77
prop_serialization op =
78
  case J.readJSON (J.showJSON op) of
79
    J.Error e -> failTest $ "Cannot deserialise: " ++ e
80
    J.Ok op' -> op ==? op'
77
prop_serialization = testSerialisation
81 78

  
82 79
-- | Check that Python and Haskell defined the same opcode list.
83 80
case_AllDefined :: HUnit.Assertion

Also available in: Unified diff