leo/tests/compiler/finalize/mapping.leo
Collin Chin 5a7feb28f7
Improve testing infrastructure (#2227)
* wip

* re-enable get_process call for test programs

* remove local tests

* clean up

* remove rust version from cargo.toml
2023-01-03 17:51:13 -08:00

43 lines
735 B
Plaintext

/*
namespace: Compile
expectation: Pass
*/
program test.aleo {
transition matches(addr: address) -> bool {
return self.caller == addr;
}
mapping balances: address => u128;
struct Token {
owner: address;
balance: u128;
}
mapping tokens: address => Token;
struct Bar {
a: u128;
}
struct Baz {
a: u128;
}
mapping foo: Bar => Baz;
record RealToken {
// The token owner.
owner: address,
// The Aleo balance (in gates).
gates: u64,
// The token amount.
amount: u64,
}
mapping real_tokens: address => RealToken;
mapping owners: RealToken => address;
}