Generate #line in all blocks
Generate proper #line directives in all BEGIN_xxx blocks. Before,
there were #line directives for BEGIN_SUITE_HELPERS and BEGIN_CASE but
not BEGIN_HEADER, so debug information for code in the header block
pointed inside helpers.function instead of the test's source file.
diff --git a/tests/scripts/generate_code.pl b/tests/scripts/generate_code.pl
index e489a00..4c24c7c 100755
--- a/tests/scripts/generate_code.pl
+++ b/tests/scripts/generate_code.pl
@@ -111,12 +111,7 @@
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 .*\*\//)
+ if ($line =~ /^\/\* BEGIN_.*\*\//)
{
$line = $line."#line $index \"$test_case_file\"\n";
}