Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
d0cd committed Apr 18, 2023
1 parent 8426f82 commit 62f8506
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
namespace: Compile
expectation: Fail
expectation: Pass
*/

program test.aleo {
Expand Down
18 changes: 18 additions & 0 deletions tests/tests/compiler/finalize/unknown_mapping_operation_fail.leo
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
namespace: Compile
expectation: Fail
*/

program test.aleo {

mapping account: address => u64;

transition mint_public(public receiver: address, public amount: u64) {
return then finalize(receiver, amount);
}

finalize mint_public (public receiver: address, public amount: u64) {
let has_key: bool = Mapping::has_key(account, receiver);
Mapping::set(account, receiver, amount);
}
}

0 comments on commit 62f8506

Please sign in to comment.