Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7379 from xtuc/refactor-use-wast-in-tests
switch to tests to wast
- Loading branch information
Showing
32 changed files
with
115 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
(module | ||
(type $t0 (func (result i32))) | ||
(type $t1 (func (param i32) (result i32))) | ||
(import "./wasm2.wat" "getNumber" (func $./wasm2.wasm.getNumber (type $t0))) | ||
(func $addNumber (export "addNumber") (type $t1) (param $p0 i32) (result i32) | ||
(i32.add | ||
(get_local $p0) | ||
(call $./wasm2.wasm.getNumber)))) | ||
|
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
(module | ||
(type $t0 (func (result i32))) | ||
(func $getNumber (export "getNumber") (type $t0) (result i32) | ||
(i32.const 22))) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
(module | ||
(type $t0 (func (result i32))) | ||
(type $t1 (func (param i32) (result i32))) | ||
(import "./module" "getNumber" (func $./module.getNumber (type $t0))) | ||
(func $addNumber (export "addNumber") (type $t1) (param $p0 i32) (result i32) | ||
(i32.add | ||
(get_local $p0) | ||
(call $./module.getNumber)))) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
(module | ||
(type $t0 (func (result i32))) | ||
(type $t1 (func (param i32) (result i32))) | ||
(import "./module" "getNumber" (func $./module.getNumber (type $t0))) | ||
(func $addNumber (export "addNumber") (type $t1) (param $p0 i32) (result i32) | ||
(i32.add | ||
(get_local $p0) | ||
(call $./module.getNumber)))) | ||
|
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
(module | ||
(type $t0 (func (result i32))) | ||
(type $t1 (func (param i32))) | ||
(import "./memory.wat" "memory" (memory $./memory.wasm.memory 1)) | ||
(func $get (export "get") (type $t0) (result i32) | ||
(i32.load | ||
(i32.const 0))) | ||
(func $set (export "set") (type $t1) (param $p i32) | ||
(i32.store | ||
(i32.const 0) | ||
(get_local $p)))) |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
(module | ||
(memory $memory (export "memory") 1) | ||
(data (i32.const 12) "\00\00\00\00")) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
(module | ||
(type $t0 (func (param i32 i32) (result i32))) | ||
(type $t1 (func (result i32))) | ||
(func $add (export "add") (type $t0) (param $p0 i32) (param $p1 i32) (result i32) | ||
(i32.add | ||
(get_local $p0) | ||
(get_local $p1))) | ||
(func $getNumber (export "getNumber") (type $t1) (result i32) | ||
(i32.const 40))) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
(module | ||
(type $t0 (func (result i32))) | ||
(func $f1 (type $t0) (result i32) | ||
(i32.const 42)) | ||
(func $f2 (type $t0) (result i32) | ||
(i32.const 13)) | ||
(table $table (export "table") 2 anyfunc) | ||
(elem (i32.const 0) $f1 $f2)) | ||
|
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
(module | ||
(type $t0 (func (result i32))) | ||
(type $t1 (func (param i32) (result i32))) | ||
(import "./wasm-table-export.wat" "table" (table $./wasm-table-export.wasm.table 2 anyfunc)) | ||
(func $callByIndex (export "callByIndex") (type $t1) (param $i i32) (result i32) | ||
(call_indirect (type $t0) | ||
(get_local $i)))) | ||
|
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
(module | ||
(type $t0 (func (result i32))) | ||
(type $t1 (func (result i32))) | ||
(type $t2 (func (param i32) (result i32))) | ||
(func $f0 (type $t0) (result i32) | ||
(i32.const 42)) | ||
(func $f1 (type $t0) (result i32) | ||
(i32.const 13)) | ||
(func $callByIndex (export "callByIndex") (type $t2) (param $p0 i32) (result i32) | ||
(call_indirect (type $t1) | ||
(get_local $p0))) | ||
(table $T0 2 anyfunc) | ||
(elem (i32.const 0) $f0 $f1)) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters