diff options
author | Jacob Champion <jchampion@apache.org> | 2017-05-25 23:18:33 +0200 |
---|---|---|
committer | Jacob Champion <jchampion@apache.org> | 2017-05-25 23:18:33 +0200 |
commit | a4308d4c64e365feacb95951aff300ad1db1af10 (patch) | |
tree | bda9178a1b9da474dbec211015c2376e60dffafb /build | |
parent | httpdunit: a Check-based unit test suite (diff) | |
download | apache2-a4308d4c64e365feacb95951aff300ad1db1af10.tar.xz apache2-a4308d4c64e365feacb95951aff300ad1db1af10.zip |
httpdunit_gen_cases: separate declarations from calls
This gets around strict compiler warnings.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/httpdunit@1796203 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'build')
-rwxr-xr-x | build/httpdunit_gen_cases.pl | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/build/httpdunit_gen_cases.pl b/build/httpdunit_gen_cases.pl index a40d12c773..8e492a664d 100755 --- a/build/httpdunit_gen_cases.pl +++ b/build/httpdunit_gen_cases.pl @@ -14,10 +14,21 @@ use strict; use warnings; +use Getopt::Long; + +my $print_declaration = 0; + +GetOptions("declaration" => \$print_declaration) + or die("unknown option"); + while (my $line = <>) { if ($line =~ /^HTTPD_BEGIN_TEST_CASE(?:\w+)?\((\w+)/) { my $name = "$1_test_case"; - print "TCase *$name(void); "; - print "suite_add_tcase(suite, $name());\n"; + + if ($print_declaration) { + print "TCase *$name(void);\n"; + } else { + print "suite_add_tcase(suite, $name());\n"; + } } } |