Add test for empty loops (#169)

This commit is contained in:
Alexander Theißen
2021-09-06 16:25:50 +02:00
committed by GitHub
parent 6ff274f0b8
commit 2f88f49ef6
+26
View File
@@ -964,4 +964,30 @@ mod tests {
(get_global 0)))
"#
}
test_gas_counter_injection! {
name = empty_loop;
input = r#"
(module
(func
(loop
(br 0)
)
unreachable
)
)
"#;
expected = r#"
(module
(func
(call 0 (i32.const 2))
(loop
(call 0 (i32.const 1))
(br 0)
)
unreachable
)
)
"#
}
}