From 4b26850e14abe86569e4cf587bbd4ef197b383b5 Mon Sep 17 00:00:00 2001 From: Christian Boltz Date: Thu, 20 Sep 2018 00:49:42 +0200 Subject: [PATCH] error out on superfluous TODOs If a test is marked as TODO, but matches its EXRESULT, this means the TODO is superfluous and (probably) a change fixed what the TODO was for. Instead of more or less ignoring such superfluous TODOs, error out to make the change visible instantly. --- parser/tst/simple.pl | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/parser/tst/simple.pl b/parser/tst/simple.pl index e11d95230..36fd70ccb 100755 --- a/parser/tst/simple.pl +++ b/parser/tst/simple.pl @@ -131,9 +131,13 @@ sub test_profile { } elsif ($coredump) { ok(0, "$profile: Produced core dump (signal $signal): $description"); } elsif ($istodo) { - TODO: { - local $TODO = "Unfixed testcase."; - ok($expass ? !$result : $result, "TODO: $profile: $description"); + if ($expass != $result) { + fail("TODO passed unexpectedly: $profile: $description"); + } else { + TODO: { + local $TODO = "Unfixed testcase."; + ok($expass ? !$result : $result, "TODO: $profile: $description"); + } } } else { ok($expass ? !$result : $result, "$profile: $description");