diff --git a/src/protocol/tests/eval_calls.rs b/src/protocol/tests/eval_calls.rs index c3539167f93d2e02f0b126181fa688d26a8be9b6..f9a1e3c7ff545504193df16b75442b85270fcb6e 100644 --- a/src/protocol/tests/eval_calls.rs +++ b/src/protocol/tests/eval_calls.rs @@ -25,4 +25,17 @@ fn test_function_call() { }").for_function("foo", |f| { f.call_ok(Some(Value::Bool(true))); }); +} + +#[test] +fn test_empty_blocks() { + // Yes this is silly, but I managed to make this a bug before + Tester::new_single_source_expect_ok("traversing empty statements", " + func foo() -> u32 { + auto val = 128; + if (true) {} + while (false) {} + return val; + } + ").for_function("foo", |f| { f.call_ok(Some(Value::UInt32(128))); }); } \ No newline at end of file