add test for nested mutable value

This commit is contained in:
collin 2020-12-02 12:31:51 -05:00
parent 1217e9860e
commit 4cb07d5cd3
2 changed files with 13 additions and 0 deletions

View File

@ -0,0 +1,5 @@
function main () {
let mut x = 2u8;
let mut y = x;
let z = y / 2u8;
}

View File

@ -33,6 +33,14 @@ fn test_let_mut() {
assert_satisfied(program);
}
#[test]
fn test_let_mut_nested() {
let bytes = include_bytes!("let_mut_nested.leo");
let program = parse_program(bytes).unwrap();
assert_satisfied(program);
}
#[test]
fn test_const_fail() {
let bytes = include_bytes!("const.leo");