Skip to content

Commit 686fdd4

Browse files
author
timlinux
committed
Eliminate duplicate test cases when overloaded methods are encountered
git-svn-id: http://svn.osgeo.org/qgis/trunk@5236 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent c62d418 commit 686fdd4

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

tests/src/core/test_builder.pl

+14-5
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
print "Stubs will be created for the following methods:\n";
3333
open CPPFILE, "<../../../src/core/$testClassLowerCaseName.cpp"|| die 'Unable to open header file $testClassLowerCaseName.cpp';
3434
$stubString="";
35+
$lastLine="";
3536
while(<CPPFILE>)
3637
{
3738
if(m/${testClass}::[A-Za-z0-9]*\(/)
@@ -42,11 +43,19 @@
4243
$line =~ s/:://g;
4344
#strip off the (
4445
$line =~ s/\(//g;
45-
#add it to our stub code
46-
$stubString = $stubString . " void $line()\n\(\n\n\)\n";
47-
#show the user the list
48-
print $line;
49-
print "\n";
46+
if ($lastLine eq $line)
47+
{
48+
#duplicate entry
49+
}
50+
else
51+
{
52+
#add it to our stub code
53+
$stubString = $stubString . " void $line()\n\{\n\n\};\n";
54+
#show the user the list
55+
print $line;
56+
print "\n";
57+
}
58+
$lastLine=$line;
5059
}
5160
}
5261
print "-----------------------------\n";

0 commit comments

Comments
 (0)