summaryrefslogtreecommitdiff
path: root/scripts/test/spectest.js
diff options
context:
space:
mode:
authorHeejin Ahn <aheejin@gmail.com>2019-11-29 18:33:41 -0800
committerGitHub <noreply@github.com>2019-11-29 18:33:41 -0800
commit24d274983df9f7dbeebe8a890297d4f30d5bbca7 (patch)
treeb76f10f6de34e94b8c0e449b18427daeb34bee0c /scripts/test/spectest.js
parent8c97dc61a713768d7f8302ec3a695c1207ce7239 (diff)
downloadbinaryen-24d274983df9f7dbeebe8a890297d4f30d5bbca7.tar.gz
binaryen-24d274983df9f7dbeebe8a890297d4f30d5bbca7.tar.bz2
binaryen-24d274983df9f7dbeebe8a890297d4f30d5bbca7.zip
Update spec test suite (#2484)
This updates spec test suite to that of the current up-to-date version of https://github.com/WebAssembly/spec repo. - All failing tests are added in `BLACKLIST` in shared.py with reasons. - For tests that already existed and was passing and started failing after the update, we add the new test to the blacklist and preserve the old file by renaming it to 'old_[FILENAME].wast' not to lose test coverage. When the cause of the error is fixed or the unsupported construct gets support so the new test passes, we can delete the corresponding 'old_[FILENAME].wast' file. - Adds support for `spectest.print_[type] style imports.
Diffstat (limited to 'scripts/test/spectest.js')
-rw-r--r--scripts/test/spectest.js21
1 files changed, 19 insertions, 2 deletions
diff --git a/scripts/test/spectest.js b/scripts/test/spectest.js
index 0756209b6..3c4bac1b5 100644
--- a/scripts/test/spectest.js
+++ b/scripts/test/spectest.js
@@ -1,3 +1,20 @@
-export function print(...args) {
- console.log(...args);
+export function print() {
+ console.log();
+}
+export function print_i32(arg) {
+ console.log(arg, ' : i32');
+}
+export function print_f32(arg) {
+ console.log(arg, ' : f32');
+}
+export function print_f64(arg) {
+ console.log(arg, ' : f64');
+}
+export function print_i32_f32(arg0, arg1) {
+ console.log(arg0, ' : i32');
+ console.log(arg1, ' : f32');
+}
+export function print_f64_f64(arg0, arg1) {
+ console.log(arg0, ' : f64');
+ console.log(arg1, ' : f64');
}