mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-12-23 10:12:21 +03:00
Add failing test
This commit is contained in:
parent
298c2036af
commit
793e47a1a6
19
tests/tests/compiler/function/inline_twice.leo
Normal file
19
tests/tests/compiler/function/inline_twice.leo
Normal file
@ -0,0 +1,19 @@
|
||||
/*
|
||||
namespace: Compile
|
||||
expectation: Pass
|
||||
*/
|
||||
|
||||
program test.aleo {
|
||||
inline get_bit(number: u32, i: u8) -> bool {
|
||||
let mask: u32 = 1u32 << i;
|
||||
return number.and(mask) > 0u32;
|
||||
}
|
||||
|
||||
inline get_cell_occupant(board: u32, i: u8) -> u8 {
|
||||
return get_bit(board, i) ? 2u8 : 1u8;
|
||||
}
|
||||
|
||||
transition make_move(board: u32, i: u8) -> u8 {
|
||||
return get_cell_occupant(board, i);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user