From 883ec3c190abf9e9604082ab7ef70b06e125d8de Mon Sep 17 00:00:00 2001 From: Paul Vogel Date: Mon, 16 Nov 2026 14:15:05 +0100 Subject: [PATCH] remove the empty list of known unsafe patterns --- test/tests/Performance/PatternSafetyTest.php | 29 -------------------- 1 file changed, 29 deletions(-) diff --git a/test/tests/Performance/PatternSafetyTest.php b/test/tests/Performance/PatternSafetyTest.php index ab97267..0c41449 100644 --- a/test/tests/Performance/PatternSafetyTest.php +++ b/test/tests/Performance/PatternSafetyTest.php @@ -3,11 +3,6 @@ namespace Aternos\Codex\Minecraft\Test\Performance; use Aternos\Codex\Analysis\PatternInsightInterface; -use Aternos\Codex\Minecraft\Analysis\Problem\Bukkit\ChunkLoadExceptionProblem; -use Aternos\Codex\Minecraft\Analysis\Problem\Forge\ClientOnlyModProblem; -use Aternos\Codex\Minecraft\Analysis\Problem\Forge\ModFatalProblem; -use Aternos\Codex\Minecraft\Analysis\Problem\Paper\ServerJarInPluginFolderProblem; -use Aternos\Codex\Minecraft\Analysis\Problem\Forge\ModDependencyProblem; use Aternos\Codex\Minecraft\Test\Logs\TestLog; use FilesystemIterator; use Generator; @@ -70,14 +65,6 @@ class PatternSafetyTest extends TestCase "newlines" => "\n", ]; - /** - * Patterns that are known to fail on scaled entries or to grow quadratically. - * They are reported as incomplete instead of failing, remove a pattern here when fixing it. - * Which of them actually fails depends on whether PCRE JIT is enabled. - */ - protected const array KNOWN_UNSAFE_PATTERNS = [ - ]; - /** * @var string[]|null */ @@ -144,8 +131,6 @@ public function test_pattern_works_on_test_log_entries(string $class, int|string #[DataProvider("providePatterns")] public function test_pattern_works_on_scaled_entries(string $class, int|string $patternKey, string $pattern): void { - $this->skipKnownUnsafePattern($class, $patternKey); - $failures = []; foreach (static::getTestLogEntries() as $logPath => $entries) { foreach ($entries as $entryIndex => $entry) { @@ -168,8 +153,6 @@ public function test_pattern_works_on_scaled_entries(string $class, int|string $ #[DataProvider("providePatterns")] public function test_pattern_time_grows_linearly(string $class, int|string $patternKey, string $pattern): void { - $this->skipKnownUnsafePattern($class, $patternKey); - $failures = []; foreach (static::INPUT_FRAGMENTS as $fragmentName => $fragment) { $smallInput = str_repeat($fragment, intdiv(static::SMALL_INPUT_SIZE, strlen($fragment))); @@ -211,18 +194,6 @@ protected static function findPatternFailure(string $pattern, string $subject, s ); } - /** - * @param class-string $class - * @param int|string $patternKey - * @return void - */ - protected function skipKnownUnsafePattern(string $class, int|string $patternKey): void - { - if (in_array($patternKey, static::KNOWN_UNSAFE_PATTERNS[$class] ?? [], true)) { - $this->markTestIncomplete("Pattern " . $patternKey . " of " . $class . " is known to be unsafe on long entries."); - } - } - /** * Repeat everything after the first line of the entry until it reaches SCALED_ENTRY_SIZE, * like a stack trace or mod list that is much longer than in the test log