summaryrefslogtreecommitdiff
path: root/tests/misc/Paper.fst
diff options
context:
space:
mode:
authorSon Ho2022-03-05 18:46:58 +0100
committerSon Ho2022-03-05 18:46:58 +0100
commitb11b30564ad550e130e218c2ad29423e5096e66a (patch)
treeb930c1a66bef968ac17c4093c42f986f51cffdbf /tests/misc/Paper.fst
parent3e719defdd22b0e6c4bedce8996c2a58bb77a783 (diff)
Regenerate Paper.fst
Diffstat (limited to 'tests/misc/Paper.fst')
-rw-r--r--tests/misc/Paper.fst16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/misc/Paper.fst b/tests/misc/Paper.fst
index be4326d7..1278733b 100644
--- a/tests/misc/Paper.fst
+++ b/tests/misc/Paper.fst
@@ -133,3 +133,19 @@ let test_nth_fwd : result unit =
(** Unit test for [paper::test_nth] *)
let _ = assert_norm (test_nth_fwd = Return ())
+(** [paper::call_choose] *)
+let call_choose_fwd (p : (u32 & u32)) : result u32 =
+ let (px, py) = p in
+ begin match choose_fwd u32 true px py with
+ | Fail -> Fail
+ | Return i ->
+ begin match u32_add i 1 with
+ | Fail -> Fail
+ | Return pz ->
+ begin match choose_back u32 true px py pz with
+ | Fail -> Fail
+ | Return (i0, _) -> Return i0
+ end
+ end
+ end
+