Skip to content

Commit

Permalink
Add test for Lwt_mvar.take_available called twice
Browse files Browse the repository at this point in the history
Suggestion by @raphael-proust
  • Loading branch information
hcarty committed Jul 27, 2017
1 parent f496d0c commit 7799c15
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/core/test_lwt_mvar.ml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@ let suite =
Lwt.return (y = None)
);

test "take_available (twice)"
(fun () ->
let x = Lwt_mvar.create 0 in
let (_ : int option) = Lwt_mvar.take_available x in
let y = Lwt_mvar.take_available x in
Lwt.return (y = None)
);

test "is_empty (full)"
(fun () ->
let x = Lwt_mvar.create 0 in
Expand Down

0 comments on commit 7799c15

Please sign in to comment.