File tree 1 file changed +14
-5
lines changed
1 file changed +14
-5
lines changed Original file line number Diff line number Diff line change 32
32
print " Stubs will be created for the following methods:\n " ;
33
33
open CPPFILE, " <../../../src/core/$testClassLowerCaseName .cpp" || die ' Unable to open header file $testClassLowerCaseName.cpp' ;
34
34
$stubString =" " ;
35
+ $lastLine =" " ;
35
36
while (<CPPFILE>)
36
37
{
37
38
if (m /${testClass} ::[A-Za-z0-9] *\( / )
42
43
$line =~ s / ::// g ;
43
44
# strip off the (
44
45
$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 ;
50
59
}
51
60
}
52
61
print " -----------------------------\n " ;
You can’t perform that action at this time.
0 commit comments