mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-12-27 12:13:41 +03:00
37 lines
780 B
Plaintext
37 lines
780 B
Plaintext
/*
|
|
namespace: Compile
|
|
expectation: Pass
|
|
input_file: inputs/true.in
|
|
*/
|
|
|
|
program test.aleo {
|
|
struct Foo {
|
|
a: u8;
|
|
}
|
|
|
|
record Token {
|
|
// The token owner.
|
|
owner: address,
|
|
// The Aleo balance (in gates).
|
|
gates: u64,
|
|
// The token amount.
|
|
amount: u64,
|
|
}
|
|
|
|
|
|
transition main(a: bool, foo: Foo, token: Token) -> bool {
|
|
console.assert_eq(a, true);
|
|
console.assert_neq(a, false);
|
|
console.assert(a);
|
|
|
|
console.assert_eq(foo, Foo { a: 0u8 });
|
|
|
|
console.assert_neq(token, Token {
|
|
owner: aleo1lfapwg53y5enqpt0d8cnef4g8lj7l6g9uhkkma23qyv6jm4ppyfq50regr,
|
|
gates: 0u64,
|
|
amount: 0u64,
|
|
});
|
|
return a == true;
|
|
}
|
|
}
|