mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-11-22 22:44:47 +03:00
failing test
This commit is contained in:
parent
2db118a85f
commit
a37c36ac12
@ -0,0 +1,5 @@
|
||||
---
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "Error [EPAR0370026]: Only one program scope is allowed in a Leo file.\n --> compiler-test:16:1\n |\n 16 | program relay.aleo {\n | ^^^^^^^"
|
@ -0,0 +1,28 @@
|
||||
/*
|
||||
namespace: Compile
|
||||
expectation: Pass
|
||||
*/
|
||||
|
||||
program registry.aleo {
|
||||
mapping users: address => bool;
|
||||
|
||||
transition register() {
|
||||
return then finalize(self.caller);
|
||||
}
|
||||
finalize register(addr: address) {
|
||||
Mapping::set(users, addr, true);
|
||||
}
|
||||
}
|
||||
|
||||
// --- Next Program --- //
|
||||
|
||||
program relay.aleo {
|
||||
mapping users: address => bool;
|
||||
|
||||
function send(addr: address) {
|
||||
return then finalize(addr);
|
||||
}
|
||||
finalize send(addr: address) {
|
||||
let a:bool = Mapping::get(relay.aleo/users, r0);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user