diff options
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( |
