From 88a77bc5846541e5d6009bc103da378650a649f3 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 28 Apr 2024 11:02:51 +0900 Subject: test: generate PHPUnit classes from WAST files --- .../src/SpecTestsuites/Core/UnreachedValidTest.php | 85 ++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 tests/src/SpecTestsuites/Core/UnreachedValidTest.php (limited to 'tests/src/SpecTestsuites/Core/UnreachedValidTest.php') diff --git a/tests/src/SpecTestsuites/Core/UnreachedValidTest.php b/tests/src/SpecTestsuites/Core/UnreachedValidTest.php new file mode 100644 index 0000000..b5f279f --- /dev/null +++ b/tests/src/SpecTestsuites/Core/UnreachedValidTest.php @@ -0,0 +1,85 @@ +runModuleCommand( + filename: 'unreached-valid.0.wasm', + name: null, + line: 1, + ); + } + + #[Depends('testModule0')] + public function testAssertTrap1(): void + { + $this->runAssertTrapCommand( + module: null, + action: ['type' => 'invoke', 'field' => 'select-trap-left', 'args' => [['type' => 'i32', 'value' => '1']]], + text: 'unreachable', + line: 42, + ); + } + + #[Depends('testAssertTrap1')] + public function testAssertTrap2(): void + { + $this->runAssertTrapCommand( + module: null, + action: ['type' => 'invoke', 'field' => 'select-trap-left', 'args' => [['type' => 'i32', 'value' => '0']]], + text: 'unreachable', + line: 43, + ); + } + + #[Depends('testAssertTrap2')] + public function testAssertTrap3(): void + { + $this->runAssertTrapCommand( + module: null, + action: ['type' => 'invoke', 'field' => 'select-trap-right', 'args' => [['type' => 'i32', 'value' => '1']]], + text: 'unreachable', + line: 44, + ); + } + + #[Depends('testAssertTrap3')] + public function testAssertTrap4(): void + { + $this->runAssertTrapCommand( + module: null, + action: ['type' => 'invoke', 'field' => 'select-trap-right', 'args' => [['type' => 'i32', 'value' => '0']]], + text: 'unreachable', + line: 45, + ); + } + + #[Depends('testAssertTrap4')] + public function testModule5(): void + { + $this->runModuleCommand( + filename: 'unreached-valid.1.wasm', + name: null, + line: 49, + ); + } + + #[Depends('testModule5')] + public function testAssertTrap6(): void + { + $this->runAssertTrapCommand( + module: null, + action: ['type' => 'invoke', 'field' => 'meet-bottom', 'args' => []], + text: 'unreachable', + line: 63, + ); + } +} -- cgit v1.2.3-70-g09d2