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.
This commit is contained in:
SimonB 2016-05-02 21:58:19 +01:00 committed by Simon Butcher
parent 20273ddc4c
commit 4a3b023172

View File

@ -90,6 +90,11 @@ my @test_cases_lines = split/^/, <TEST_CASES>;
my $test_cases; my $test_cases;
my $index = 2; my $index = 2;
for my $line (@test_cases_lines) { for my $line (@test_cases_lines) {
if ($line =~ /^\/\* BEGIN_SUITE_HELPERS .*\*\//)
{
$line = $line."#line $index \"$test_case_file\"\n";
}
if ($line =~ /^\/\* BEGIN_CASE .*\*\//) if ($line =~ /^\/\* BEGIN_CASE .*\*\//)
{ {
$line = $line."#line $index \"$test_case_file\"\n"; $line = $line."#line $index \"$test_case_file\"\n";