diff options
| author | nsfisis <nsfisis@gmail.com> | 2025-07-29 18:23:59 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2025-10-18 19:47:13 +0900 |
| commit | a0ec6fc11cbb68d5912e850b9f73b94f4560d510 (patch) | |
| tree | 070ab472bb1bd3c5bb739b2b19052d1083fe9acd /tests/src/SpecTestsuites | |
| parent | 2656a7d724c2738bd8fa8d3a876a1228642bf54e (diff) | |
| download | php-waddiwasi-a0ec6fc11cbb68d5912e850b9f73b94f4560d510.tar.gz php-waddiwasi-a0ec6fc11cbb68d5912e850b9f73b94f4560d510.tar.zst php-waddiwasi-a0ec6fc11cbb68d5912e850b9f73b94f4560d510.zip | |
wipvalidation
Diffstat (limited to 'tests/src/SpecTestsuites')
| -rw-r--r-- | tests/src/SpecTestsuites/SpecTestsuiteBase.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/src/SpecTestsuites/SpecTestsuiteBase.php b/tests/src/SpecTestsuites/SpecTestsuiteBase.php index 49af237..3f08f84 100644 --- a/tests/src/SpecTestsuites/SpecTestsuiteBase.php +++ b/tests/src/SpecTestsuites/SpecTestsuiteBase.php @@ -31,6 +31,7 @@ use Nsfisis\Waddiwasi\WebAssembly\Structure\Types\MemType; use Nsfisis\Waddiwasi\WebAssembly\Structure\Types\Mut; use Nsfisis\Waddiwasi\WebAssembly\Structure\Types\TableType; use Nsfisis\Waddiwasi\WebAssembly\Structure\Types\ValType; +use Nsfisis\Waddiwasi\WebAssembly\Validation\Validator; use PHPUnit\Framework\TestCase; use RuntimeException; use function count; @@ -157,8 +158,12 @@ abstract class SpecTestsuiteBase extends TestCase string $text, int $line, ): void { - // @todo Our implementation does not support "validation" step. - $this->assertTrue(true); + $filePath = __DIR__ . "/../../fixtures/spec_testsuites/core/{$filename}"; + $wasmBinaryStream = new FileStream($filePath); + $module = (new Decoder($wasmBinaryStream))->decode(); + $result = (new Validator($module))->validate(); + // @todo Check error message. + $this->assertNotEmpty($result->errors, "validating {$filename} is expected to fail (at {$line})"); } protected function runAssertExhaustionCommand( |
