Skip to content

Commit

Permalink
rename main to entry for node tests
Browse files Browse the repository at this point in the history
This is to differentiate them with "main" function needed for working
with wizard engine
  • Loading branch information
doehyunbaek committed Jan 8, 2024
1 parent e4f0830 commit c6d704b
Show file tree
Hide file tree
Showing 132 changed files with 13,626 additions and 14,614 deletions.
2 changes: 1 addition & 1 deletion tests/node/call-exp-after-import-call-results/index.wat
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(module
(import "env" "foo" (func $foo (result i32)))
(import "env" "bar" (func $bar (result i32)))
(func $main (export "main")
(func $main (export "entry")
call $foo
drop
)
Expand Down
2 changes: 1 addition & 1 deletion tests/node/call-exp-after-import-call-results/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ export default async function test(wasmBinary) {
}
let wasm = await WebAssembly.instantiate(wasmBinary, imports)
instance = wasm.instance
instance.exports.main()
instance.exports.entry()
}
2 changes: 1 addition & 1 deletion tests/node/call-exp-after-import-call-table-get/index.wat
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(module
(import "env" "foo" (func $foo))
(import "env" "bar" (func $bar))
(func $main (export "main")
(func $main (export "entry")
call $foo
)
(func $exp
Expand Down
2 changes: 1 addition & 1 deletion tests/node/call-exp-after-import-call-table-get/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ export default async function test(wasmBinary) {
}
let wasm = await WebAssembly.instantiate(wasmBinary, imports)
instance = wasm.instance
instance.exports.main()
instance.exports.entry()
}
2 changes: 1 addition & 1 deletion tests/node/call-exp-after-import-call/index.wat
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(module
(import "env" "foo" (func $foo))
(import "env" "bar" (func $bar))
(func $main (export "main")
(func $main (export "entry")
call $foo
)
(func (export "exp")
Expand Down
2 changes: 1 addition & 1 deletion tests/node/call-exp-after-import-call/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ export default async function test(wasmBinary) {
}
let wasm = await WebAssembly.instantiate(wasmBinary, imports)
instance = wasm.instance
instance.exports.main()
instance.exports.entry()
}
2 changes: 1 addition & 1 deletion tests/node/call-exp-func-from-imp-func-param/index.wat
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
(import "env" "foo" (func $foo))
(import "env" "a" (func $a))
(import "env" "b" (func $b))
(func (export "main")
(func (export "entry")
call $foo
)
(func (export "bar") (param i32)
Expand Down
2 changes: 1 addition & 1 deletion tests/node/call-exp-func-from-imp-func-param/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ export default async function test(wasmBinary) {
}
let wasm = await WebAssembly.instantiate(wasmBinary, imports)
instance = wasm.instance
instance.exports.main()
instance.exports.entry()
}
2 changes: 1 addition & 1 deletion tests/node/call-imported-different-modules/index.wat
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(module
(import "env" "foo" (func $foo))
(import "env2" "bar" (func $bar))
(func $main (export "main")
(func $main (export "entry")
call $foo
call $bar
)
Expand Down
2 changes: 1 addition & 1 deletion tests/node/call-imported-different-modules/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ export default async function test(wasmBinary) {
}
}
let wasm = await WebAssembly.instantiate(wasmBinary, imports)
wasm.instance.exports.main()
wasm.instance.exports.entry()
}
2 changes: 1 addition & 1 deletion tests/node/call-imported-params/index.wat
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(module
(import "env" "add" (func $add (param i32 i32) (result i32)))
(func $main (export "main") (param i32 i32)
(func $main (export "entry") (param i32 i32)
local.get 1
local.set 0
local.get 0
Expand Down
6 changes: 3 additions & 3 deletions tests/node/call-imported-params/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default async function test(wasmBinary) {
}
let wasm = await WebAssembly.instantiate(wasmBinary, imports)
instance = wasm.instance
instance.exports.main(1, 2)
instance.exports.main(3, 2)
instance.exports.main(4, 4)
instance.exports.entry(1, 2)
instance.exports.entry(3, 2)
instance.exports.entry(4, 4)
}
2 changes: 1 addition & 1 deletion tests/node/call-imported/index.wat
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(module
(import "env" "foo" (func $foo))
(func $main (export "main")
(func $main (export "entry")
call $foo
)
)
2 changes: 1 addition & 1 deletion tests/node/call-imported/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ export default async function test(wasmBinary) {
}
let wasm = await WebAssembly.instantiate(wasmBinary, imports)
instance = wasm.instance
instance.exports.main()
instance.exports.entry()
}
2 changes: 1 addition & 1 deletion tests/node/call-indirect/index.wat
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(module
(func $a)
(func $main (export "main")
(func $main (export "entry")
i32.const 0
call_indirect)
(table 1 1 funcref)
Expand Down
2 changes: 1 addition & 1 deletion tests/node/call-indirect/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ export default async function test(wasmBinary) {
let imports = {}
let wasm = await WebAssembly.instantiate(wasmBinary, imports)
instance = wasm.instance
instance.exports.main()
instance.exports.entry()
}
2 changes: 1 addition & 1 deletion tests/node/different-mem-instructions/index.wat
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(module
(import "env" "memory" (memory 1))
(func $main (export "main")
(func $main (export "entry")
i32.const 1
i32.load8_u
drop
Expand Down
2 changes: 1 addition & 1 deletion tests/node/different-mem-instructions/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ export default async function test(wasmBinary) {
}
let wasm = await WebAssembly.instantiate(wasmBinary, imports)
instance = wasm.instance
instance.exports.main()
instance.exports.entry()
}
2 changes: 1 addition & 1 deletion tests/node/export-called-multiple/index.wat
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
(module
(func $main (export "main"))
(func $main (export "entry"))
(func $foo (export "foo"))
(func $bar (export "bar"))
)
2 changes: 1 addition & 1 deletion tests/node/export-called-multiple/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ export default async function test(wasmBinary) {
let imports = {}
let wasm = await WebAssembly.instantiate(wasmBinary, imports)
instance = wasm.instance
instance.exports.main()
instance.exports.entry()
instance.exports.foo()
instance.exports.bar()
instance.exports.foo()
Expand Down
2 changes: 1 addition & 1 deletion tests/node/exported-called-param/index.wat
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(module
(import "env" "foo" (func $foo))
(import "env" "bar" (func $bar))
(func $main (export "main") (param i32)
(func $main (export "entry") (param i32)
local.get 0
(if (then (call $foo)) (else (call $bar)))
)
Expand Down
2 changes: 1 addition & 1 deletion tests/node/exported-called-param/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ export default async function test(wasmBinary) {
}
let wasm = await WebAssembly.instantiate(wasmBinary, imports)
instance = wasm.instance
instance.exports.main(1)
instance.exports.entry(1)
}
2 changes: 1 addition & 1 deletion tests/node/exported-called-params-grow-mem/index.wat
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(module
(import "env" "foo" (func $foo ))
(memory 1 10)
(func $main (export "main") (param i32)
(func $main (export "entry") (param i32)
local.get 0
memory.grow
drop
Expand Down
6 changes: 3 additions & 3 deletions tests/node/exported-called-params-grow-mem/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default async function test(wasmBinary) {
}
let wasm = await WebAssembly.instantiate(wasmBinary, imports)
instance = wasm.instance
instance.exports.main(1)
instance.exports.main(3)
instance.exports.main(4)
instance.exports.entry(1)
instance.exports.entry(3)
instance.exports.entry(4)
}
2 changes: 1 addition & 1 deletion tests/node/exported-called/index.wat
Original file line number Diff line number Diff line change
@@ -1 +1 @@
(module (func $main (export "main")))
(module (func $main (export "entry")))
2 changes: 1 addition & 1 deletion tests/node/exported-called/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ export default async function test(wasmBinary) {
let imports = {}
let wasm = await WebAssembly.instantiate(wasmBinary, imports)
instance = wasm.instance
instance.exports.main()
instance.exports.entry()
}
2 changes: 1 addition & 1 deletion tests/node/glob-exp-host-mod-detection/index.wat
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(module
(import "env" "changeGlobal" (func $changeGlobal (param i32)))
(func $main (export "main")
(func $main (export "entry")
i32.const 2
global.set 0
i32.const 5
Expand Down
2 changes: 1 addition & 1 deletion tests/node/glob-exp-host-mod-detection/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ export default async function test(wasmBinary) {
}
let wasm = await WebAssembly.instantiate(wasmBinary, imports)
instance = wasm.instance
instance.exports.main()
instance.exports.entry()
}
2 changes: 1 addition & 1 deletion tests/node/glob-exp-host-mod-f32/index.wat
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(module
(import "env" "changeGlobal" (func $changeGlobal (param f32)))
(func $main (export "main")
(func $main (export "entry")
f32.const 5
call $changeGlobal
global.get 0
Expand Down
2 changes: 1 addition & 1 deletion tests/node/glob-exp-host-mod-f32/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ export default async function test(wasmBinary) {
}
let wasm = await WebAssembly.instantiate(wasmBinary, imports)
instance = wasm.instance
instance.exports.main()
instance.exports.entry()
}
2 changes: 1 addition & 1 deletion tests/node/glob-exp-host-mod-f64/index.wat
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(module
(import "env" "changeGlobal" (func $changeGlobal (param f64)))
(func $main (export "main")
(func $main (export "entry")
f64.const 5
call $changeGlobal
global.get 0
Expand Down
2 changes: 1 addition & 1 deletion tests/node/glob-exp-host-mod-f64/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ export default async function test(wasmBinary) {
}
let wasm = await WebAssembly.instantiate(wasmBinary, imports)
instance = wasm.instance
instance.exports.main()
instance.exports.entry()
}
2 changes: 1 addition & 1 deletion tests/node/glob-exp-host-mod-i32/index.wat
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(module
(import "env" "changeGlobal" (func $changeGlobal (param i32)))
(func $main (export "main")
(func $main (export "entry")
i32.const 4
call $changeGlobal
global.get $global
Expand Down
2 changes: 1 addition & 1 deletion tests/node/glob-exp-host-mod-i32/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ export default async function test(wasmBinary) {
}
let wasm = await WebAssembly.instantiate(wasmBinary, imports)
instance = wasm.instance
instance.exports.main()
instance.exports.entry()
}
2 changes: 1 addition & 1 deletion tests/node/glob-exp-host-mod-i64/index.wat
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(module
(import "env" "changeGlobal" (func $changeGlobal (param i64)))
(func $main (export "main")
(func $main (export "entry")
i64.const 5
call $changeGlobal
global.get 0
Expand Down
2 changes: 1 addition & 1 deletion tests/node/glob-exp-host-mod-i64/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ export default async function test(wasmBinary) {
}
let wasm = await WebAssembly.instantiate(wasmBinary, imports)
instance = wasm.instance
instance.exports.main()
instance.exports.entry()
}
2 changes: 1 addition & 1 deletion tests/node/glob-exp-host-mod-multiple/index.wat
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(module
(import "env" "changeGlobal" (func $changeGlobal (param i32)))
(func $main (export "main")
(func $main (export "entry")
i32.const 2
global.set 0
i32.const 5
Expand Down
2 changes: 1 addition & 1 deletion tests/node/glob-exp-host-mod-multiple/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ export default async function test(wasmBinary) {
}
let wasm = await WebAssembly.instantiate(wasmBinary, imports)
instance = wasm.instance
instance.exports.main()
instance.exports.entry()
}
2 changes: 1 addition & 1 deletion tests/node/glob-exp-host-mod-param/index.wat
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(module
(import "env" "changeGlobal" (func $changeGlobal (param i32 i32)))
(func $main (export "main")
(func $main (export "entry")
i32.const 0
i32.const 5
call $changeGlobal
Expand Down
2 changes: 1 addition & 1 deletion tests/node/glob-exp-host-mod-param/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ export default async function test(wasmBinary) {
}
let wasm = await WebAssembly.instantiate(wasmBinary, imports)
instance = wasm.instance
instance.exports.main()
instance.exports.entry()
}
2 changes: 1 addition & 1 deletion tests/node/glob-exp-not-mut/index.wat
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(module
(import "env" "changeGlobal" (func $changeGlobal))
(func $main (export "main")
(func $main (export "entry")
call $changeGlobal
global.get 0
drop
Expand Down
2 changes: 1 addition & 1 deletion tests/node/glob-exp-not-mut/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ export default async function test(wasmBinary) {
}
let wasm = await WebAssembly.instantiate(wasmBinary, imports)
instance = wasm.instance
instance.exports.main()
instance.exports.entry()
}
2 changes: 1 addition & 1 deletion tests/node/glob-imp-const/index.wat
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(module
(import "env" "global" (global $global i32))
(func $main (export "main")
(func $main (export "entry")
global.get $global
drop
)
Expand Down
2 changes: 1 addition & 1 deletion tests/node/glob-imp-const/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ export default async function test(wasmBinary) {
}
let wasm = await WebAssembly.instantiate(wasmBinary, imports)
instance = wasm.instance
instance.exports.main()
instance.exports.entry()
}
2 changes: 1 addition & 1 deletion tests/node/glob-imp-different-init/index.wat
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(module
(import "env" "global" (global $global (mut i32)))
(func $main (export "main")
(func $main (export "entry")
global.get $global
drop
)
Expand Down
2 changes: 1 addition & 1 deletion tests/node/glob-imp-different-init/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ export default async function test(wasmBinary) {
}
let wasm = await WebAssembly.instantiate(wasmBinary, imports)
instance = wasm.instance
instance.exports.main()
instance.exports.entry()
}
2 changes: 1 addition & 1 deletion tests/node/glob-imp-different-value/index.wat
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(module
(import "env" "global" (global $global (mut i32)))
(func $main (export "main")
(func $main (export "entry")
global.get $global
drop
)
Expand Down
2 changes: 1 addition & 1 deletion tests/node/glob-imp-different-value/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ export default async function test(wasmBinary) {
}
let wasm = await WebAssembly.instantiate(wasmBinary, imports)
instance = wasm.instance
instance.exports.main()
instance.exports.entry()
}
2 changes: 1 addition & 1 deletion tests/node/glob-imp-f64/index.wat
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(module
(import "env" "global" (global $global (mut f64)))
(func $main (export "main")
(func $main (export "entry")
global.get $global
drop
)
Expand Down
Loading

0 comments on commit c6d704b

Please sign in to comment.