diff options
Diffstat (limited to 'tests/src/SpecTestsuites/SpecTestsuiteBase.php')
| -rw-r--r-- | tests/src/SpecTestsuites/SpecTestsuiteBase.php | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/src/SpecTestsuites/SpecTestsuiteBase.php b/tests/src/SpecTestsuites/SpecTestsuiteBase.php index cd5da89..eca3b5c 100644 --- a/tests/src/SpecTestsuites/SpecTestsuiteBase.php +++ b/tests/src/SpecTestsuites/SpecTestsuiteBase.php @@ -9,6 +9,7 @@ use Nsfisis\Waddiwasi\BinaryFormat\InvalidBinaryFormatException; use Nsfisis\Waddiwasi\Execution\Ref; use Nsfisis\Waddiwasi\Execution\Refs\RefExtern; use Nsfisis\Waddiwasi\Execution\Runtime; +use Nsfisis\Waddiwasi\Execution\StackOverflowException; use Nsfisis\Waddiwasi\Execution\Store; use Nsfisis\Waddiwasi\Execution\TrapException; use Nsfisis\Waddiwasi\Execution\TrapKind; @@ -95,11 +96,19 @@ abstract class SpecTestsuiteBase extends TestCase } protected function runAssertExhaustionCommand( + ?string $module, array $action, string $text, int $line, ): void { - $this->assertTrue(false, "assert_exhaustion"); + $exception = null; + try { + $this->doAction($module, $action); + } catch (StackOverflowException $e) { + $exception = $e; + } + $this->assertNotNull($exception, "at $line"); + // @todo Check $text? } protected function runAssertUninstantiableCommand( |
