diff options
author | Zyad Hassan | 2024-04-24 10:01:27 -0700 |
---|---|---|
committer | Zyad Hassan | 2024-04-24 10:01:27 -0700 |
commit | 1728dced8484befe35ef61fdf4ccd62b93fbb19d (patch) | |
tree | 5bbd84963ba68c5a681ba5a947c2579ab98e739f /tests/lean | |
parent | 97a70ecd3e70d08fae544dc11cca0fb1e06e5a66 (diff) |
Fix a couple of tests
Diffstat (limited to '')
-rw-r--r-- | tests/lean/BetreeMain/Funs.lean | 4 | ||||
-rw-r--r-- | tests/lean/BetreeMain/FunsExternal.lean | 5 | ||||
-rw-r--r-- | tests/lean/External/Funs.lean | 3 | ||||
-rw-r--r-- | tests/lean/External/FunsExternal.lean | 5 |
4 files changed, 4 insertions, 13 deletions
diff --git a/tests/lean/BetreeMain/Funs.lean b/tests/lean/BetreeMain/Funs.lean index 0c31b9bc..57b334fa 100644 --- a/tests/lean/BetreeMain/Funs.lean +++ b/tests/lean/BetreeMain/Funs.lean @@ -238,11 +238,11 @@ divergent def betree.Node.apply_upserts betree.Node.apply_upserts msgs1 (some v) key st else do - let (st1, v) ← core.option.Option.unwrap U64 prev st + let v ← core.option.Option.unwrap U64 prev let msgs1 ← betree.List.push_front (U64 × betree.Message) msgs (key, betree.Message.Insert v) - Result.ok (st1, (v, msgs1)) + Result.ok (st, (v, msgs1)) /- [betree_main::betree::{betree_main::betree::Internal#4}::lookup_in_children]: Source: 'src/betree.rs', lines 395:4-395:63 -/ diff --git a/tests/lean/BetreeMain/FunsExternal.lean b/tests/lean/BetreeMain/FunsExternal.lean index 71d26da4..d26177fb 100644 --- a/tests/lean/BetreeMain/FunsExternal.lean +++ b/tests/lean/BetreeMain/FunsExternal.lean @@ -28,8 +28,3 @@ def betree_utils.load_leaf_node def betree_utils.store_leaf_node : U64 → betree.List (U64 × U64) → State → Result (State × Unit) := fun _ _ _ => .fail .panic - -/- [core::option::Option::{0}::unwrap] -/ -def core.option.Option.unwrap - (T : Type) : Option T → State → Result (State × T) := - fun _ _ => .fail .panic diff --git a/tests/lean/External/Funs.lean b/tests/lean/External/Funs.lean index 78e0f95c..3bdd70e3 100644 --- a/tests/lean/External/Funs.lean +++ b/tests/lean/External/Funs.lean @@ -19,7 +19,8 @@ def test_new_non_zero_u32 (x : U32) (st : State) : Result (State × core.num.nonzero.NonZeroU32) := do let (st1, o) ← core.num.nonzero.NonZeroU32.new x st - core.option.Option.unwrap core.num.nonzero.NonZeroU32 o st1 + let o1 ← core.option.Option.unwrap core.num.nonzero.NonZeroU32 o + Result.ok (st1, o1) /- [external::test_vec]: Source: 'src/external.rs', lines 17:0-17:17 -/ diff --git a/tests/lean/External/FunsExternal.lean b/tests/lean/External/FunsExternal.lean index b6efc65f..7adf0922 100644 --- a/tests/lean/External/FunsExternal.lean +++ b/tests/lean/External/FunsExternal.lean @@ -15,8 +15,3 @@ def core.mem.swap def core.num.nonzero.NonZeroU32.new : U32 → State → Result (State × (Option core_num_nonzero_non_zero_u32_t)) := fun _ _ => .fail .panic - -/- [core::option::Option::{0}::unwrap] -/ -def core.option.Option.unwrap - (T : Type) : Option T → State → Result (State × T) := - fun _ _ => .fail .panic |