File tree Expand file tree Collapse file tree 7 files changed +14
-9
lines changed
Expand file tree Collapse file tree 7 files changed +14
-9
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,6 @@ if_icmp1.class
33--cover location --no-trivial-tests
44^EXIT=0$
55^SIGNAL=0$
6- ^\*\* 13 of 29 covered (44.8 %)
6+ ^\*\* 12 of 27 covered (44.4 %)
77--
88^warning: ignoring
Original file line number Diff line number Diff line change @@ -3,6 +3,6 @@ Person.class
33--cover location --no-trivial-tests
44^EXIT=0$
55^SIGNAL=0$
6- ^\*\* 5 of 5 covered (100.0%)
6+ ^\*\* 4 of 4 covered (100.0%)
77--
88^warning: ignoring
Original file line number Diff line number Diff line change @@ -3,6 +3,6 @@ Person.class
33--cover location --no-trivial-tests
44^EXIT=0$
55^SIGNAL=0$
6- ^\*\* 12 of 15 covered (80.0 %)
6+ ^\*\* 11 of 14 covered (78.6 %)
77--
88^warning: ignoring
Original file line number Diff line number Diff line change @@ -3,6 +3,6 @@ Person.class
33--cover location --no-trivial-tests
44^EXIT=0$
55^SIGNAL=0$
6- ^\*\* 15 of 23 covered (65.2 %)
6+ ^\*\* 14 of 22 covered (63.6 %)
77--
88^warning: ignoring
Original file line number Diff line number Diff line change @@ -3,6 +3,6 @@ Person.class
33--cover location --no-trivial-tests
44^EXIT=0$
55^SIGNAL=0$
6- ^\*\* 16 of 24 covered (66.7 %)
6+ ^\*\* 15 of 23 covered (65.2 %)
77--
88^warning: ignoring
Original file line number Diff line number Diff line change @@ -3,6 +3,6 @@ Account.class
33--cover location --no-trivial-tests
44^EXIT=0$
55^SIGNAL=0$
6- ^\*\* 17 of 18 covered (94.4 %)
6+ ^\*\* 13 of 13 covered (100.0 %)
77--
88^warning: ignoring
Original file line number Diff line number Diff line change @@ -8,6 +8,8 @@ Date: May 2016
88
99\*******************************************************************/
1010
11+ #include < iostream>
12+
1113#include < algorithm>
1214#include < iterator>
1315
@@ -1608,9 +1610,12 @@ bool consider_goals(
16081610 ++count_decl;
16091611 }
16101612
1611- // this might be a get or set method (pattern)
1612- result = !((count_decl==0 ) && (count_goto<=1 ) &&
1613- (count_assignments>0 && count_assignments<5 ));
1613+ // check whether this is a constructor/destructor or a get/set (pattern)
1614+ if (!count_goto && !count_assignments && !count_decl)
1615+ result=false ;
1616+ else
1617+ result = !((count_decl==0 ) && (count_goto<=1 ) &&
1618+ (count_assignments>0 && count_assignments<5 ));
16141619
16151620 return result;
16161621}
You can’t perform that action at this time.
0 commit comments