add test for the fixed bug

This commit is contained in:
gluaxspeed 2021-02-08 15:42:37 -05:00
parent 1898cc6840
commit 2f6cc6c995
2 changed files with 17 additions and 0 deletions

View 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..]);
}

View File

@ -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);
}