summaryrefslogtreecommitdiff
path: root/tests/lean/External
diff options
context:
space:
mode:
authorSon Ho2023-07-04 18:09:36 +0200
committerSon Ho2023-07-04 18:09:36 +0200
commitb643bd00747e75d69b6066c55a1798b61277c4b6 (patch)
tree84bbebe82964efc0d779ea782f3ae4b946ca3483 /tests/lean/External
parent74b3ce71b0e3794853aa1413afaaaa05c8cc5a84 (diff)
Regenerate the Lean test files
Diffstat (limited to 'tests/lean/External')
-rw-r--r--tests/lean/External/ExternalFuns.lean9
-rw-r--r--tests/lean/External/Funs.lean3
-rw-r--r--tests/lean/External/Opaque.lean14
-rw-r--r--tests/lean/External/Types.lean3
4 files changed, 24 insertions, 5 deletions
diff --git a/tests/lean/External/ExternalFuns.lean b/tests/lean/External/ExternalFuns.lean
new file mode 100644
index 00000000..d63db2ac
--- /dev/null
+++ b/tests/lean/External/ExternalFuns.lean
@@ -0,0 +1,9 @@
+import Base
+import External.Types
+import External.Opaque
+
+namespace External
+
+def opaque_defs : OpaqueDefs := sorry
+
+end External
diff --git a/tests/lean/External/Funs.lean b/tests/lean/External/Funs.lean
index 73e45938..e36987e0 100644
--- a/tests/lean/External/Funs.lean
+++ b/tests/lean/External/Funs.lean
@@ -5,6 +5,8 @@ import External.Types
import External.ExternalFuns
open Primitives
+namespace External
+
/- [external::swap] -/
def swap_fwd
(T : Type) (x : T) (y : T) (st : State) : Result (State × Unit) :=
@@ -86,3 +88,4 @@ def test_swap_non_zero_fwd (x : U32) (st : State) : Result (State × U32) :=
then Result.fail Error.panic
else Result.ret (st1, x0)
+end External
diff --git a/tests/lean/External/Opaque.lean b/tests/lean/External/Opaque.lean
index 5483c3a9..1c0db095 100644
--- a/tests/lean/External/Opaque.lean
+++ b/tests/lean/External/Opaque.lean
@@ -4,25 +4,29 @@ import Base
import External.Types
open Primitives
+namespace External
+
structure OpaqueDefs where
/- [core::mem::swap] -/
- core_mem_swap_fwd (T : Type) : T -> T -> State -> Result (State × Unit)
+ core_mem_swap_fwd (T : Type) : T → T → State → Result (State × Unit)
/- [core::mem::swap] -/
core_mem_swap_back0
- (T : Type) : T -> T -> State -> State -> Result (State × T)
+ (T : Type) : T → T → State → State → Result (State × T)
/- [core::mem::swap] -/
core_mem_swap_back1
- (T : Type) : T -> T -> State -> State -> Result (State × T)
+ (T : Type) : T → T → State → State → Result (State × T)
/- [core::num::nonzero::NonZeroU32::{14}::new] -/
core_num_nonzero_non_zero_u32_new_fwd
:
- U32 -> State -> Result (State × (Option core_num_nonzero_non_zero_u32_t))
+ U32 → State → Result (State × (Option
+ core_num_nonzero_non_zero_u32_t))
/- [core::option::Option::{0}::unwrap] -/
core_option_option_unwrap_fwd
- (T : Type) : Option T -> State -> Result (State × T)
+ (T : Type) : Option T → State → Result (State × T)
+end External
diff --git a/tests/lean/External/Types.lean b/tests/lean/External/Types.lean
index 25907da2..fda0670e 100644
--- a/tests/lean/External/Types.lean
+++ b/tests/lean/External/Types.lean
@@ -3,9 +3,12 @@
import Base
open Primitives
+namespace External
+
/- [core::num::nonzero::NonZeroU32] -/
axiom core_num_nonzero_non_zero_u32_t : Type
/- The state type used in the state-error monad -/
axiom State : Type
+end External