aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--BUGS5
-rw-r--r--TODO1
-rw-r--r--phpunit.xml1
-rw-r--r--tests/src/SpecTestsuites/SpecTestsuiteBase.php3
4 files changed, 3 insertions, 7 deletions
diff --git a/BUGS b/BUGS
index 007f656..e69de29 100644
--- a/BUGS
+++ b/BUGS
@@ -1,5 +0,0 @@
-# Failed spec tests
-
-## Validation
-
-* ImportsTest
diff --git a/TODO b/TODO
index 171eb28..37a5ced 100644
--- a/TODO
+++ b/TODO
@@ -1,6 +1,5 @@
* Support text format (.wat)
* Implement validation
-* Fix known bugs (BUGS)
* Provide sane bindings to PHP
* Write PHPDoc for public APIs
* Provide high-level APIs
diff --git a/phpunit.xml b/phpunit.xml
index bc472e4..c425b3c 100644
--- a/phpunit.xml
+++ b/phpunit.xml
@@ -52,6 +52,7 @@
<file>tests/src/SpecTestsuites/Core/I32Test.php</file>
<file>tests/src/SpecTestsuites/Core/I64Test.php</file>
<file>tests/src/SpecTestsuites/Core/IfTest.php</file>
+ <file>tests/src/SpecTestsuites/Core/ImportsTest.php</file>
<file>tests/src/SpecTestsuites/Core/InlineModuleTest.php</file>
<file>tests/src/SpecTestsuites/Core/IntExprsTest.php</file>
<file>tests/src/SpecTestsuites/Core/IntLiteralsTest.php</file>
diff --git a/tests/src/SpecTestsuites/SpecTestsuiteBase.php b/tests/src/SpecTestsuites/SpecTestsuiteBase.php
index 5b3cc4d..92af279 100644
--- a/tests/src/SpecTestsuites/SpecTestsuiteBase.php
+++ b/tests/src/SpecTestsuites/SpecTestsuiteBase.php
@@ -13,6 +13,7 @@ use Nsfisis\Waddiwasi\WebAssembly\Execution\FuncInst;
use Nsfisis\Waddiwasi\WebAssembly\Execution\GlobalInst;
use Nsfisis\Waddiwasi\WebAssembly\Execution\Linker;
use Nsfisis\Waddiwasi\WebAssembly\Execution\MemInst;
+use Nsfisis\Waddiwasi\WebAssembly\Execution\NumericOps;
use Nsfisis\Waddiwasi\WebAssembly\Execution\Ref;
use Nsfisis\Waddiwasi\WebAssembly\Execution\Refs\RefExtern;
use Nsfisis\Waddiwasi\WebAssembly\Execution\Refs\RefFunc;
@@ -73,7 +74,7 @@ abstract class SpecTestsuiteBase extends TestCase
])),
'global_i32' => Extern::Global_(new GlobalInst(new GlobalType(Mut::Const, ValType::I32), 666)),
'global_i64' => Extern::Global_(new GlobalInst(new GlobalType(Mut::Const, ValType::I64), 666)),
- 'global_f32' => Extern::Global_(new GlobalInst(new GlobalType(Mut::Const, ValType::F32), 666.6)),
+ 'global_f32' => Extern::Global_(new GlobalInst(new GlobalType(Mut::Const, ValType::F32), NumericOps::truncateF64ToF32(666.6))),
'global_f64' => Extern::Global_(new GlobalInst(new GlobalType(Mut::Const, ValType::F64), 666.6)),
'print' => Extern::Func(FuncInst::Host(new FuncType([], []), fn () => null)),
'print_i32' => Extern::Func(FuncInst::Host(new FuncType([ValType::I32], []), fn () => null)),