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 --- tests/src/SpecTestsuites/Core/CustomTest.php | 120 +++++++++++++++++++++++++++ 1 file changed, 120 insertions(+) create mode 100644 tests/src/SpecTestsuites/Core/CustomTest.php (limited to 'tests/src/SpecTestsuites/Core/CustomTest.php') diff --git a/tests/src/SpecTestsuites/Core/CustomTest.php b/tests/src/SpecTestsuites/Core/CustomTest.php new file mode 100644 index 0000000..98eb51a --- /dev/null +++ b/tests/src/SpecTestsuites/Core/CustomTest.php @@ -0,0 +1,120 @@ +runModuleCommand( + filename: 'custom.0.wasm', + name: null, + line: 1, + ); + } + + #[Depends('testModule0')] + public function testModule1(): void + { + $this->runModuleCommand( + filename: 'custom.1.wasm', + name: null, + line: 14, + ); + } + + #[Depends('testModule1')] + public function testModule2(): void + { + $this->runModuleCommand( + filename: 'custom.2.wasm', + name: null, + line: 50, + ); + } + + #[Depends('testModule2')] + public function testAssertMalformed3(): void + { + $this->runAssertMalformedCommand( + filename: 'custom.3.wasm', + text: 'unexpected end', + line: 61, + ); + } + + #[Depends('testAssertMalformed3')] + public function testAssertMalformed4(): void + { + $this->runAssertMalformedCommand( + filename: 'custom.4.wasm', + text: 'unexpected end', + line: 69, + ); + } + + #[Depends('testAssertMalformed4')] + public function testAssertMalformed5(): void + { + $this->runAssertMalformedCommand( + filename: 'custom.5.wasm', + text: 'unexpected end', + line: 77, + ); + } + + #[Depends('testAssertMalformed5')] + public function testAssertMalformed6(): void + { + $this->runAssertMalformedCommand( + filename: 'custom.6.wasm', + text: 'length out of bounds', + line: 85, + ); + } + + #[Depends('testAssertMalformed6')] + public function testAssertMalformed7(): void + { + $this->runAssertMalformedCommand( + filename: 'custom.7.wasm', + text: 'malformed section id', + line: 93, + ); + } + + #[Depends('testAssertMalformed7')] + public function testAssertMalformed8(): void + { + $this->runAssertMalformedCommand( + filename: 'custom.8.wasm', + text: 'function and code section have inconsistent lengths', + line: 102, + ); + } + + #[Depends('testAssertMalformed8')] + public function testAssertMalformed9(): void + { + $this->runAssertMalformedCommand( + filename: 'custom.9.wasm', + text: 'length out of bounds', + line: 115, + ); + } + + #[Depends('testAssertMalformed9')] + public function testAssertMalformed10(): void + { + $this->runAssertMalformedCommand( + filename: 'custom.10.wasm', + text: 'data count and data section have inconsistent lengths', + line: 123, + ); + } +} -- cgit v1.2.3-70-g09d2