add test for the fixed bug

This commit is contained in:
gluaxspeed 2021-02-08 13:44:30 -05:00
parent 1898cc6840
commit 9651af3089
2 changed files with 21 additions and 0 deletions

View File

@ -0,0 +1,13 @@
circuit Bar {
b2: u32
function add_five(z:u32) -> u32 {
return z+5u32
}
}
function main () {
let Bar = 66u32;
const k1 = Bar{ b2: 30u32 };
const k2 = Bar::add_five(55u32);
}

View File

@ -283,3 +283,11 @@ fn test_define_circuit_inside_circuit_function() {
assert_satisfied(program);
}
#[test]
fn test_duplicate_name_context() {
let program_string = include_str!("duplicate_name_context.leo");
let program = parse_program(program_string).unwrap();
assert_satisfied(program);
}