Skip to content

Commit

Permalink
server-test: fail property if protocol does not complete
Browse files Browse the repository at this point in the history
  • Loading branch information
UlfNorell authored and coot committed Oct 14, 2021
1 parent c052323 commit 7a98cfa
Showing 1 changed file with 6 additions and 6 deletions.
Expand Up @@ -800,9 +800,9 @@ unidirectionalExperiment snocket socket clientAndServerData = do
)
pure $
foldr
(\(r, expected) acc ->
(\ (r, expected) acc ->
case r of
Left _ -> acc
Left err -> counterexample (show err) False
Right a -> a === expected .&&. acc)
(property True)
$ zip rs (expectedResult clientAndServerData clientAndServerData)
Expand Down Expand Up @@ -923,17 +923,17 @@ bidirectionalExperiment

pure $
foldr
(\(r, expected) acc ->
(\ (r, expected) acc ->
case r of
Left _ -> acc
Left err -> counterexample (show err) False
Right a -> a === expected .&&. acc)
(property True)
(zip rs0 (expectedResult clientAndServerData0 clientAndServerData1))
.&&.
foldr
(\(r, expected) acc ->
(\ (r, expected) acc ->
case r of
Left _ -> acc
Left err -> counterexample (show err) False
Right a -> a === expected .&&. acc)
(property True)
(zip rs1 (expectedResult clientAndServerData1 clientAndServerData0))
Expand Down

0 comments on commit 7a98cfa

Please sign in to comment.