From 789bc52585289891520fd1fbfff8f0c335a5a5c2 Mon Sep 17 00:00:00 2001 From: d0cd Date: Fri, 10 Feb 2023 22:56:14 -0800 Subject: [PATCH] Add execution test --- .../structs/struct_with_visibility_fail.leo | 2 +- tests/tests/execution/mint.leo | 31 +++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 tests/tests/execution/mint.leo diff --git a/tests/tests/compiler/structs/struct_with_visibility_fail.leo b/tests/tests/compiler/structs/struct_with_visibility_fail.leo index 0af2b22ff8..b96329278b 100644 --- a/tests/tests/compiler/structs/struct_with_visibility_fail.leo +++ b/tests/tests/compiler/structs/struct_with_visibility_fail.leo @@ -8,7 +8,7 @@ program test.aleo { constant a: u8, private bar: bool, public bax: u16, - baz: u32e + baz: u32, } transition main(a: u8) -> u8 { diff --git a/tests/tests/execution/mint.leo b/tests/tests/execution/mint.leo new file mode 100644 index 0000000000..bf51b962fb --- /dev/null +++ b/tests/tests/execution/mint.leo @@ -0,0 +1,31 @@ +/* +namespace: Execute +expectation: Pass +cases: + mint: + - input: ["0u64"] + - input: ["1u64"] +*/ + + +program test.aleo { + record Token { + // The token owner. + private owner: address, + // The Aleo balance (in gates). + public gates: u64, + // The token amount. + amount: u64, + // The flag. + constant flag: bool, + } + + transition mint(amount: u64) -> Token { + return Token { + owner: self.caller, + gates: 0u64, + amount: amount, + flag: true, + }; + } +}