mirror of
https://github.com/c-cube/moonpool.git
synced 2025-12-10 05:03:58 -05:00
add test
This commit is contained in:
parent
dd5a177a5f
commit
826d1f15c8
1 changed files with 10 additions and 0 deletions
|
|
@ -109,3 +109,13 @@ let () =
|
|||
in
|
||||
ignore (Fut.wait_block_exn (Fut.join_list [ fut1; fut2 ]) : _ list);
|
||||
assert (Atomic.get n = 99 * 100)
|
||||
|
||||
let () =
|
||||
let f1 = mk_ret_delay 0.1 "foo" in
|
||||
assert (
|
||||
try
|
||||
ignore (Fut.get_or_fail f1);
|
||||
false
|
||||
with Fut.Not_ready -> true);
|
||||
ignore (Fut.wait_block f1);
|
||||
assert (Fut.get_or_fail f1 = Ok "foo")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue