mirror of
https://github.com/AleoHQ/leo.git
synced 2025-01-05 08:50:21 +03:00
add type fail tests
This commit is contained in:
parent
8cf5eb8790
commit
f286ba241d
@ -126,3 +126,19 @@ fn test_multi() {
|
|||||||
|
|
||||||
assert_satisfied(program);
|
assert_satisfied(program);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_multi_initializer_fail() {
|
||||||
|
let program_bytes = include_bytes!("multi_fail_initializer.leo");
|
||||||
|
let program = parse_program(program_bytes).unwrap();
|
||||||
|
|
||||||
|
expect_compiler_error(program);
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_multi_inline_fail() {
|
||||||
|
let program_bytes = include_bytes!("multi_fail_inline.leo");
|
||||||
|
let program = parse_program(program_bytes).unwrap();
|
||||||
|
|
||||||
|
expect_compiler_error(program);
|
||||||
|
}
|
||||||
|
3
compiler/tests/array/multi_fail_initializer.leo
Normal file
3
compiler/tests/array/multi_fail_initializer.leo
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
function main() {
|
||||||
|
let arr: [u8; (2, 2)] = [[1u8; 2]; 1]; // incorrect dimensions
|
||||||
|
}
|
4
compiler/tests/array/multi_fail_inline.leo
Normal file
4
compiler/tests/array/multi_fail_inline.leo
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
function main() {
|
||||||
|
let arr: [u8; (2, 2)] = [[1u8, 1u8],
|
||||||
|
[1u8]]; // incorrect dimensions
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user