diff options
| author | nsfisis <nsfisis@gmail.com> | 2024-04-28 11:02:51 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2024-04-28 17:38:19 +0900 |
| commit | 88a77bc5846541e5d6009bc103da378650a649f3 (patch) | |
| tree | ef4d3a57cc16bf230c3ac25068001f747e45b35e /tests/src/SpecTestsuites/Core/SkipStackGuardPageTest.php | |
| parent | c809cd661bba388d531f24c2ac578fbe6594f45c (diff) | |
| download | php-waddiwasi-88a77bc5846541e5d6009bc103da378650a649f3.tar.gz php-waddiwasi-88a77bc5846541e5d6009bc103da378650a649f3.tar.zst php-waddiwasi-88a77bc5846541e5d6009bc103da378650a649f3.zip | |
test: generate PHPUnit classes from WAST files
Diffstat (limited to 'tests/src/SpecTestsuites/Core/SkipStackGuardPageTest.php')
| -rw-r--r-- | tests/src/SpecTestsuites/Core/SkipStackGuardPageTest.php | 120 |
1 files changed, 120 insertions, 0 deletions
diff --git a/tests/src/SpecTestsuites/Core/SkipStackGuardPageTest.php b/tests/src/SpecTestsuites/Core/SkipStackGuardPageTest.php new file mode 100644 index 0000000..5ac00fe --- /dev/null +++ b/tests/src/SpecTestsuites/Core/SkipStackGuardPageTest.php @@ -0,0 +1,120 @@ +<?php + +declare(strict_types=1); + +namespace Nsfisis\Waddiwasi\Tests\SpecTestsuites\Core; + +use Nsfisis\Waddiwasi\Tests\SpecTestsuites\SpecTestsuiteBase; +use PHPUnit\Framework\Attributes\Depends; + +final class SkipStackGuardPageTest extends SpecTestsuiteBase +{ + public function testModule0(): void + { + $this->runModuleCommand( + filename: 'skip-stack-guard-page.0.wasm', + name: null, + line: 2, + ); + } + + #[Depends('testModule0')] + public function testAssertExhaustion1(): void + { + $this->runAssertExhaustionCommand( + action: ['type' => 'invoke', 'field' => 'test-guard-page-skip', 'args' => [['type' => 'i32', 'value' => '0']]], + text: 'call stack exhausted', + line: 2275, + ); + } + + #[Depends('testAssertExhaustion1')] + public function testAssertExhaustion2(): void + { + $this->runAssertExhaustionCommand( + action: ['type' => 'invoke', 'field' => 'test-guard-page-skip', 'args' => [['type' => 'i32', 'value' => '100']]], + text: 'call stack exhausted', + line: 2276, + ); + } + + #[Depends('testAssertExhaustion2')] + public function testAssertExhaustion3(): void + { + $this->runAssertExhaustionCommand( + action: ['type' => 'invoke', 'field' => 'test-guard-page-skip', 'args' => [['type' => 'i32', 'value' => '200']]], + text: 'call stack exhausted', + line: 2277, + ); + } + + #[Depends('testAssertExhaustion3')] + public function testAssertExhaustion4(): void + { + $this->runAssertExhaustionCommand( + action: ['type' => 'invoke', 'field' => 'test-guard-page-skip', 'args' => [['type' => 'i32', 'value' => '300']]], + text: 'call stack exhausted', + line: 2278, + ); + } + + #[Depends('testAssertExhaustion4')] + public function testAssertExhaustion5(): void + { + $this->runAssertExhaustionCommand( + action: ['type' => 'invoke', 'field' => 'test-guard-page-skip', 'args' => [['type' => 'i32', 'value' => '400']]], + text: 'call stack exhausted', + line: 2279, + ); + } + + #[Depends('testAssertExhaustion5')] + public function testAssertExhaustion6(): void + { + $this->runAssertExhaustionCommand( + action: ['type' => 'invoke', 'field' => 'test-guard-page-skip', 'args' => [['type' => 'i32', 'value' => '500']]], + text: 'call stack exhausted', + line: 2280, + ); + } + + #[Depends('testAssertExhaustion6')] + public function testAssertExhaustion7(): void + { + $this->runAssertExhaustionCommand( + action: ['type' => 'invoke', 'field' => 'test-guard-page-skip', 'args' => [['type' => 'i32', 'value' => '600']]], + text: 'call stack exhausted', + line: 2281, + ); + } + + #[Depends('testAssertExhaustion7')] + public function testAssertExhaustion8(): void + { + $this->runAssertExhaustionCommand( + action: ['type' => 'invoke', 'field' => 'test-guard-page-skip', 'args' => [['type' => 'i32', 'value' => '700']]], + text: 'call stack exhausted', + line: 2282, + ); + } + + #[Depends('testAssertExhaustion8')] + public function testAssertExhaustion9(): void + { + $this->runAssertExhaustionCommand( + action: ['type' => 'invoke', 'field' => 'test-guard-page-skip', 'args' => [['type' => 'i32', 'value' => '800']]], + text: 'call stack exhausted', + line: 2283, + ); + } + + #[Depends('testAssertExhaustion9')] + public function testAssertExhaustion10(): void + { + $this->runAssertExhaustionCommand( + action: ['type' => 'invoke', 'field' => 'test-guard-page-skip', 'args' => [['type' => 'i32', 'value' => '900']]], + text: 'call stack exhausted', + line: 2284, + ); + } +} |
