aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/src/SpecTestsuites/SpecTestsuiteBase.php
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2025-07-29 21:41:04 +0900
committernsfisis <nsfisis@gmail.com>2025-07-29 21:41:04 +0900
commit61abb42948d1c3f3ba9d2dfeeac2ac7645e256af (patch)
tree84edc439484d2d004e582761295d7d8b1d84dd11 /tests/src/SpecTestsuites/SpecTestsuiteBase.php
parent62d559bf2861c8de919e9a7659aa244f77ac2f1b (diff)
downloadphp-waddiwasi-61abb42948d1c3f3ba9d2dfeeac2ac7645e256af.tar.gz
php-waddiwasi-61abb42948d1c3f3ba9d2dfeeac2ac7645e256af.tar.zst
php-waddiwasi-61abb42948d1c3f3ba9d2dfeeac2ac7645e256af.zip
fix: Make ImportsTest pass
Diffstat (limited to 'tests/src/SpecTestsuites/SpecTestsuiteBase.php')
-rw-r--r--tests/src/SpecTestsuites/SpecTestsuiteBase.php3
1 files changed, 2 insertions, 1 deletions
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)),