Commit 2fb7557f authored by Klaus Aehlig's avatar Klaus Aehlig
Browse files

Verify readJSON . showJSON = Ok for LockRequest



Verify that the JSON encoding of a LockRequest can correctly
be decoded.
Signed-off-by: default avatarKlaus Aehlig <aehlig@google.com>
Reviewed-by: default avatarPetr Pudlak <pudlak@google.com>
parent 07423850
......@@ -380,6 +380,13 @@ prop_OwnerSound =
. flip all (lockOwners state) $ \owner ->
not . M.null $ listLocks owner state
-- | Verify that for LockRequest we have readJSON . showJSON = Ok.
prop_ReadShowRequest :: Property
prop_ReadShowRequest =
forAll (arbitrary :: Gen (LockRequest TestLock)) $ \state ->
J.readJSON (J.showJSON state) ==? J.Ok state
testSuite "Locking/Allocation"
[ 'prop_LocksDisjoint
, 'prop_LockslistComplete
......@@ -398,4 +405,5 @@ testSuite "Locking/Allocation"
, 'prop_ReadShow
, 'prop_OwnerComplete
, 'prop_OwnerSound
, 'prop_ReadShowRequest
]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment