aboutsummaryrefslogtreecommitdiff
path: root/src/test/resources/com/puppycrawl/tools/checkstyle/checks
diff options
context:
space:
mode:
authorrnveach <rveach02@gmail.com>2017-12-06 09:38:19 -0500
committerRoman Ivanov <romani@users.noreply.github.com>2017-12-06 18:58:43 -0800
commit350a5a513d3655a12541b7411c8bf73abba6a0c8 (patch)
tree50014255b3da1fb24863a6d0bf78ed09c1da44f1 /src/test/resources/com/puppycrawl/tools/checkstyle/checks
parent4724dde1e531d9def217c7b20317d64100457fa3 (diff)
downloadcheckstyle-350a5a513d3655a12541b7411c8bf73abba6a0c8.tar.gz
Issue #5008: increased pitest of coding package
Diffstat (limited to 'src/test/resources/com/puppycrawl/tools/checkstyle/checks')
-rw-r--r--src/test/resources/com/puppycrawl/tools/checkstyle/checks/coding/illegaltype/InputIllegalType.java2
-rw-r--r--src/test/resources/com/puppycrawl/tools/checkstyle/checks/coding/nestedfordepth/InputNestedForDepth.java3
-rw-r--r--src/test/resources/com/puppycrawl/tools/checkstyle/checks/coding/onestatementperline/InputOneStatementPerLineSingleLine.java7
-rw-r--r--src/test/resources/com/puppycrawl/tools/checkstyle/checks/coding/parameterassignment/InputParameterAssignmentWithUnchecked.java13
-rw-r--r--src/test/resources/com/puppycrawl/tools/checkstyle/checks/coding/unnecessaryparentheses/InputUnnecessaryParenthesesOperatorsAndCasts.java8
5 files changed, 33 insertions, 0 deletions
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/checks/coding/illegaltype/InputIllegalType.java b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/coding/illegaltype/InputIllegalType.java
index dfce5fddc..2efc892ca 100644
--- a/src/test/resources/com/puppycrawl/tools/checkstyle/checks/coding/illegaltype/InputIllegalType.java
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/coding/illegaltype/InputIllegalType.java
@@ -21,4 +21,6 @@ public class InputIllegalType {
InputIllegalType(Integer i) {}
private void table2(Integer i) {}
+
+ private void getInitialContext(java.util.TreeSet v) {} // ignore method by default
}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/checks/coding/nestedfordepth/InputNestedForDepth.java b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/coding/nestedfordepth/InputNestedForDepth.java
index dfa0eb6c2..cfa8356e7 100644
--- a/src/test/resources/com/puppycrawl/tools/checkstyle/checks/coding/nestedfordepth/InputNestedForDepth.java
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/coding/nestedfordepth/InputNestedForDepth.java
@@ -44,6 +44,9 @@ public class InputNestedForDepth {
for (i5 = 0; i5 < 10; i5++) {
i += 1;
}
+ for (int i5a = 0; i5a < 10; i5a++) {
+ i += 1;
+ }
}
}
}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/checks/coding/onestatementperline/InputOneStatementPerLineSingleLine.java b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/coding/onestatementperline/InputOneStatementPerLineSingleLine.java
index 185b7b74f..4a20cb731 100644
--- a/src/test/resources/com/puppycrawl/tools/checkstyle/checks/coding/onestatementperline/InputOneStatementPerLineSingleLine.java
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/coding/onestatementperline/InputOneStatementPerLineSingleLine.java
@@ -238,4 +238,11 @@ public class InputOneStatementPerLineSingleLine {
*/
for (;;) { one = 5; }
}
+
+ public void foo6() {
+ bar(() -> {
+ return;}, () -> {return;});
+ }
+
+ void bar(Runnable r1, Runnable r2) { }
}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/checks/coding/parameterassignment/InputParameterAssignmentWithUnchecked.java b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/coding/parameterassignment/InputParameterAssignmentWithUnchecked.java
index 60f8eed0b..fbfc6e786 100644
--- a/src/test/resources/com/puppycrawl/tools/checkstyle/checks/coding/parameterassignment/InputParameterAssignmentWithUnchecked.java
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/coding/parameterassignment/InputParameterAssignmentWithUnchecked.java
@@ -19,4 +19,17 @@ public class InputParameterAssignmentWithUnchecked {
void foo3(String field, int field1) {
this.field = (field1 += field.length());
}
+
+ void foo4() {
+ String hidden = "";
+ new NestedClass() {
+ public void test(String hidden) {
+ }
+ };
+ hidden += "test";
+ }
+
+ public static abstract class NestedClass {
+ public abstract void test(String hidden);
+ }
}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/checks/coding/unnecessaryparentheses/InputUnnecessaryParenthesesOperatorsAndCasts.java b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/coding/unnecessaryparentheses/InputUnnecessaryParenthesesOperatorsAndCasts.java
index 777f4b15e..33246c199 100644
--- a/src/test/resources/com/puppycrawl/tools/checkstyle/checks/coding/unnecessaryparentheses/InputUnnecessaryParenthesesOperatorsAndCasts.java
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/coding/unnecessaryparentheses/InputUnnecessaryParenthesesOperatorsAndCasts.java
@@ -87,6 +87,14 @@ public class InputUnnecessaryParenthesesOperatorsAndCasts {
System.identityHashCode("arg = " + arg);
}
+ private int f7() {
+ String f;
+
+ f = ("12345678901234567890123");
+
+ return 0;
+ }
+
static class TypeParameterized<T> {}
static class TypeA extends TypeParameterized<String> {}
static class TypeB extends TypeA {}