Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
oowekyala committed Aug 13, 2017
1 parent 5bd2fc1 commit abc70c6
Showing 1 changed file with 90 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,95 @@
}
}
public void example1() {
if (a && b || b && d) {
if (y == z) {
x = 2;
} else if (y == t && !d) {
x = 2;
} else {
x = 2;
}
}
}
public void example2() {
if (c && d) {
while (z < y) {
x = 2;
}
}
}
public void example12() {
if (a && b || b && d) {
if (y == z) {
x = 2;
} else if (y == t && !d) {
x = 2;
} else {
x = 2;
}
}
}
public void example22() {
if (c && d) {
while (z < y) {
x = 2;
}
}
}
public void example3() {
if (a && !b) {
for (int n = 0; n < t; n++) {
x = 2;
}
}
}
public void example32() {
if (a && !b) {
for (int n = 0; n < t; n++) {
x = 2;
}
}
}
public void example4() {
switch (x) {
case 1:
x = 2;
break;
case 2:
case 3:
x = 2;
break;
default:
x = 2;
break;
}
}
public void example42() {
switch (x) {
case 1:
x = 2;
break;
case 2:
case 3:
x = 2;
break;
default:
x = 2;
break;
}
}
}
]]>
</code-fragment>
Expand All @@ -357,7 +446,7 @@
<description>Test many unreported methods</description>
<expected-problems>1</expected-problems>
<expected-messages>
<message>The class 'Complicated' has a total cyclomatic complexity of 40 (highest 8).</message>
<message>The class 'Complicated' has a total cyclomatic complexity of 80 (highest 8).</message>
</expected-messages>
<code-ref id="many-small-methods"/>
</test-code>
Expand Down

0 comments on commit abc70c6

Please sign in to comment.