From 37f2620db68081c5131fa2798b6bdfb50dcbc27f Mon Sep 17 00:00:00 2001 From: SimonB Date: Mon, 2 May 2016 21:58:19 +0100 Subject: [PATCH] Adds line numbering in errors for test helpers Adds to the 'generate_code.pl' tool, support to insert line numbers before test suite helper code. --- tests/scripts/generate_code.pl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/scripts/generate_code.pl b/tests/scripts/generate_code.pl index e940b5a1a..49af2db7f 100755 --- a/tests/scripts/generate_code.pl +++ b/tests/scripts/generate_code.pl @@ -90,6 +90,11 @@ my @test_cases_lines = split/^/, ; my $test_cases; my $index = 2; for my $line (@test_cases_lines) { + if ($line =~ /^\/\* BEGIN_SUITE_HELPERS .*\*\//) + { + $line = $line."#line $index \"$test_case_file\"\n"; + } + if ($line =~ /^\/\* BEGIN_CASE .*\*\//) { $line = $line."#line $index \"$test_case_file\"\n";