Add i32 literals support.

This commit is contained in:
Sergey Pepyakin
2018-12-11 20:12:55 +01:00
parent 0e9ba8332f
commit e02dbf1bc2
3 changed files with 26 additions and 1 deletions

View File

@@ -129,4 +129,18 @@ fn function_call() {
assert_eq!(execute_wat(code, 2, 0), 2);
}
#[test]
fn literals() {
let code = r#"
(module
(func (param i32) (param i32) (result i32)
(i32.const 228)
)
)
"#;
assert_eq!(execute_wat(code, 0, 0), 228);
}
// TODO: Add a test that checks argument passing via the stack.