add a test to check const statements fail

This commit is contained in:
gluax 2021-02-17 09:06:30 -05:00
parent f952da330c
commit b96dc782f9
2 changed files with 9 additions and 0 deletions

View File

@ -0,0 +1,3 @@
function main() {
const x = 1u32;
}

View File

@ -21,3 +21,9 @@ fn test_num_returns_fail() {
let program_string = include_str!("num_returns_fail.leo");
load_asg(program_string).err().unwrap();
}
#[test]
fn test_const_declaration_fail() {
let program_string = include_str!("const_declaration_fail.leo");
load_asg(program_string).err().unwrap();
}