From b455f94c841b2423898f39bc9b6a4c35a3db56e3 Mon Sep 17 00:00:00 2001 From: Son Ho Date: Thu, 4 Apr 2024 16:20:20 +0200 Subject: Regenerate the test files --- tests/lean/External/Funs.lean | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'tests/lean/External') diff --git a/tests/lean/External/Funs.lean b/tests/lean/External/Funs.lean index cfb2cb3c..78e0f95c 100644 --- a/tests/lean/External/Funs.lean +++ b/tests/lean/External/Funs.lean @@ -26,10 +26,10 @@ def test_new_non_zero_u32 def test_vec : Result Unit := do let _ ← alloc.vec.Vec.push U32 (alloc.vec.Vec.new U32) 0#u32 - Result.ret () + Result.ok () /- Unit test for [external::test_vec] -/ -#assert (test_vec == Result.ret ()) +#assert (test_vec == Result.ok ()) /- [external::custom_swap]: Source: 'src/external.rs', lines 24:0-24:66 -/ @@ -39,8 +39,8 @@ def custom_swap := do let (st1, (x1, y1)) ← core.mem.swap T x y st - let back := fun ret st2 => Result.ret (st2, (ret, y1)) - Result.ret (st1, (x1, back)) + let back := fun ret st2 => Result.ok (st2, (ret, y1)) + Result.ok (st1, (x1, back)) /- [external::test_custom_swap]: Source: 'src/external.rs', lines 29:0-29:59 -/ @@ -49,7 +49,7 @@ def test_custom_swap do let (st1, (_, custom_swap_back)) ← custom_swap U32 x y st let (_, (x1, y1)) ← custom_swap_back 1#u32 st1 - Result.ret (st1, (x1, y1)) + Result.ok (st1, (x1, y1)) /- [external::test_swap_non_zero]: Source: 'src/external.rs', lines 35:0-35:44 -/ @@ -59,6 +59,6 @@ def test_swap_non_zero (x : U32) (st : State) : Result (State × U32) := let (x1, _) := p if x1 = 0#u32 then Result.fail .panic - else Result.ret (st1, x1) + else Result.ok (st1, x1) end external -- cgit v1.2.3 From 2f8aa9b47acb5c98aed91c29b04f71099452e781 Mon Sep 17 00:00:00 2001 From: Son Ho Date: Thu, 11 Apr 2024 20:22:26 +0200 Subject: Update a Lean file --- tests/lean/External/FunsExternal.lean | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/lean/External') diff --git a/tests/lean/External/FunsExternal.lean b/tests/lean/External/FunsExternal.lean index 63830abc..b6efc65f 100644 --- a/tests/lean/External/FunsExternal.lean +++ b/tests/lean/External/FunsExternal.lean @@ -9,7 +9,7 @@ open external /- [core::mem::swap] -/ def core.mem.swap (T : Type) : T → T → State → Result (State × (T × T)) := - fun x y s => .ret (s, (y, x)) + fun x y s => .ok (s, (y, x)) /- [core::num::nonzero::NonZeroU32::{14}::new] -/ def core.num.nonzero.NonZeroU32.new : -- cgit v1.2.3