Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update WAT format in several test cases #1935

Merged
merged 1 commit into from
Nov 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/vm/src/cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ mod tests {
static INVALID_CONTRACT_WAT: &str = r#"(module
(type $t0 (func (param i32) (result i32)))
(func $add_one (export "add_one") (type $t0) (param $p0 i32) (result i32)
get_local $p0
local.get $p0
i32.const 1
i32.add))
"#;
Expand Down
2 changes: 1 addition & 1 deletion packages/vm/src/modules/file_system_cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ mod tests {
const SOME_WAT: &str = r#"(module
(type $t0 (func (param i32) (result i32)))
(func $add_one (export "add_one") (type $t0) (param $p0 i32) (result i32)
get_local $p0
local.get $p0
i32.const 1
i32.add))
"#;
Expand Down
6 changes: 3 additions & 3 deletions packages/vm/src/modules/in_memory_cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,21 +120,21 @@ mod tests {
const WAT1: &str = r#"(module
(type $t0 (func (param i32) (result i32)))
(func $add_one (export "add_one") (type $t0) (param $p0 i32) (result i32)
get_local $p0
local.get $p0
i32.const 1
i32.add)
)"#;
const WAT2: &str = r#"(module
(type $t0 (func (param i32) (result i32)))
(func $add_one (export "add_two") (type $t0) (param $p0 i32) (result i32)
get_local $p0
local.get $p0
i32.const 2
i32.add)
)"#;
const WAT3: &str = r#"(module
(type $t0 (func (param i32) (result i32)))
(func $add_one (export "add_three") (type $t0) (param $p0 i32) (result i32)
get_local $p0
local.get $p0
i32.const 3
i32.add)
)"#;
Expand Down
10 changes: 5 additions & 5 deletions packages/vm/src/modules/pinned_memory_cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ mod tests {
r#"(module
(type $t0 (func (param i32) (result i32)))
(func $add_one (export "add_one") (type $t0) (param $p0 i32) (result i32)
get_local $p0
local.get $p0
i32.const 1
i32.add)
)"#,
Expand Down Expand Up @@ -144,7 +144,7 @@ mod tests {
r#"(module
(type $t0 (func (param i32) (result i32)))
(func $add_one (export "add_one") (type $t0) (param $p0 i32) (result i32)
get_local $p0
local.get $p0
i32.const 1
i32.add)
)"#,
Expand Down Expand Up @@ -176,7 +176,7 @@ mod tests {
r#"(module
(type $t0 (func (param i32) (result i32)))
(func $add_one (export "add_one") (type $t0) (param $p0 i32) (result i32)
get_local $p0
local.get $p0
i32.const 1
i32.add)
)"#,
Expand Down Expand Up @@ -208,7 +208,7 @@ mod tests {
r#"(module
(type $t0 (func (param i32) (result i32)))
(func $add_one (export "add_one") (type $t0) (param $p0 i32) (result i32)
get_local $p0
local.get $p0
i32.const 1
i32.add)
)"#,
Expand All @@ -219,7 +219,7 @@ mod tests {
r#"(module
(type $t0 (func (param i32) (result i32)))
(func $add_one (export "add_two") (type $t0) (param $p0 i32) (result i32)
get_local $p0
local.get $p0
i32.const 2
i32.add)
)"#,
Expand Down
8 changes: 4 additions & 4 deletions packages/vm/src/wasm_backend/gatekeeper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -710,8 +710,8 @@ mod tests {
r#"
(module
(func (export "sum") (param i32 i32) (result i32)
get_local 0
get_local 1
local.get 0
local.get 1
i32.add
))
"#,
Expand All @@ -732,8 +732,8 @@ mod tests {
r#"
(module
(func $to_float (param i32) (result f32)
get_local 0
f32.convert_u/i32
local.get 0
f32.convert_i32_u
))
"#,
)
Expand Down