Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Eliminate duplicate test cases when overloaded methods are encountered
git-svn-id: http://svn.osgeo.org/qgis/trunk@5236 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux committed Apr 9, 2006
1 parent c62d418 commit 686fdd4
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions tests/src/core/test_builder.pl
Expand Up @@ -32,6 +32,7 @@
print "Stubs will be created for the following methods:\n";
open CPPFILE, "<../../../src/core/$testClassLowerCaseName.cpp"|| die 'Unable to open header file $testClassLowerCaseName.cpp';
$stubString="";
$lastLine="";
while(<CPPFILE>)
{
if(m/${testClass}::[A-Za-z0-9]*\(/)
Expand All @@ -42,11 +43,19 @@
$line =~ s/:://g;
#strip off the (
$line =~ s/\(//g;
#add it to our stub code
$stubString = $stubString . " void $line()\n\(\n\n\)\n";
#show the user the list
print $line;
print "\n";
if ($lastLine eq $line)
{
#duplicate entry
}
else
{
#add it to our stub code
$stubString = $stubString . " void $line()\n\{\n\n\};\n";
#show the user the list
print $line;
print "\n";
}
$lastLine=$line;
}
}
print "-----------------------------\n";
Expand Down

0 comments on commit 686fdd4

Please sign in to comment.