mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-11-23 07:07:07 +03:00
add test for the fixed bug
This commit is contained in:
parent
1898cc6840
commit
2f6cc6c995
9
compiler/tests/function/array_params_direct_call.leo
Normal file
9
compiler/tests/function/array_params_direct_call.leo
Normal file
@ -0,0 +1,9 @@
|
||||
function do_nothing(arr: [u32; 2]) {}
|
||||
|
||||
function main() {
|
||||
let arr: [u32; 2] = [0; 2];
|
||||
|
||||
do_nothing(arr);
|
||||
do_nothing([...arr]);
|
||||
do_nothing(arr[1u32..]);
|
||||
}
|
@ -203,3 +203,11 @@ fn test_return_tuple_conditional() {
|
||||
|
||||
assert_satisfied(program);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_array_params_direct_call() {
|
||||
let program_string = include_str!("array_params_direct_call.leo");
|
||||
let program = parse_program(program_string).unwrap();
|
||||
|
||||
assert_satisfied(program);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user