aboutsummaryrefslogtreecommitdiff
path: root/src/test/resources/com
diff options
context:
space:
mode:
authorvasilyeva <vasilyeva@rutarget.ru>2017-08-30 22:01:21 +0300
committerRoman Ivanov <romani@users.noreply.github.com>2017-08-30 17:20:44 -0700
commitd97519f448b8350510de94cdb9948527e33d5473 (patch)
tree775bd4b54620ac9d845091cf22d17c13e63d35c0 /src/test/resources/com
parentfc44df83dfaecd3d7b08ae41f6a88a958d38cf60 (diff)
downloadcheckstyle-d97519f448b8350510de94cdb9948527e33d5473.tar.gz
Issue #5007: increase coverage of pitest-checks-design to 100%
Diffstat (limited to 'src/test/resources/com')
-rw-r--r--src/test/resources/com/puppycrawl/tools/checkstyle/checks/design/innertypelast/InputInnerTypeLastClassRootClass.java18
-rw-r--r--src/test/resources/com/puppycrawl/tools/checkstyle/checks/design/mutableexception/InputMutableExceptionMultipleInputs.java15
-rw-r--r--src/test/resources/com/puppycrawl/tools/checkstyle/checks/design/throwscount/InputThrowsCountMwthodWithAnnotation.java20
-rw-r--r--src/test/resources/com/puppycrawl/tools/checkstyle/checks/design/visibilitymodifier/InputVisibilityModifierIsStarImport.java6
4 files changed, 59 insertions, 0 deletions
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/checks/design/innertypelast/InputInnerTypeLastClassRootClass.java b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/design/innertypelast/InputInnerTypeLastClassRootClass.java
new file mode 100644
index 000000000..1c2df5a0e
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/design/innertypelast/InputInnerTypeLastClassRootClass.java
@@ -0,0 +1,18 @@
+package com.puppycrawl.tools.checkstyle.checks.design.innertypelast;
+
+public enum InputInnerTypeLastClassRootClass {
+
+ ALWAYS(Bits.YES), NEVER(Bits.NO);
+
+ private interface Bits {
+ public static final int YES = 1;
+
+ public static final int NO = 4;
+ }
+
+ private final int bits;
+
+ private InputInnerTypeLastClassRootClass(int bits) {
+ this.bits = bits;
+ }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/checks/design/mutableexception/InputMutableExceptionMultipleInputs.java b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/design/mutableexception/InputMutableExceptionMultipleInputs.java
new file mode 100644
index 000000000..036f2d121
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/design/mutableexception/InputMutableExceptionMultipleInputs.java
@@ -0,0 +1,15 @@
+package com.puppycrawl.tools.checkstyle.checks.design.mutableexception;
+
+public class InputMutableExceptionMultipleInputs {
+
+ public class BarError extends Throwable {
+ private int errorCode;
+ }
+
+ class CustomMutableException extends java.lang.Exception {
+ int errorCode;
+ final int errorCount = 6;
+ }
+
+ private String variable;
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/checks/design/throwscount/InputThrowsCountMwthodWithAnnotation.java b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/design/throwscount/InputThrowsCountMwthodWithAnnotation.java
new file mode 100644
index 000000000..879343553
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/design/throwscount/InputThrowsCountMwthodWithAnnotation.java
@@ -0,0 +1,20 @@
+package com.puppycrawl.tools.checkstyle.checks.design.throwscount;
+
+import java.awt.AWTException;
+import java.io.EOFException;
+import java.io.FileNotFoundException;
+import java.nio.file.FileAlreadyExistsException;
+import java.sql.SQLException;
+
+public class InputThrowsCountMwthodWithAnnotation extends ParentClass {
+ @Override
+ public void method() throws AWTException, SQLException, FileNotFoundException,
+ EOFException, FileAlreadyExistsException {
+ super.method();
+ }
+}
+
+class ParentClass {
+ public void method() throws AWTException, SQLException,
+ FileNotFoundException, EOFException, FileAlreadyExistsException {}
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/checks/design/visibilitymodifier/InputVisibilityModifierIsStarImport.java b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/design/visibilitymodifier/InputVisibilityModifierIsStarImport.java
new file mode 100644
index 000000000..56a7d07ea
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/design/visibilitymodifier/InputVisibilityModifierIsStarImport.java
@@ -0,0 +1,6 @@
+package com.puppycrawl.tools.checkstyle.checks.design.visibilitymodifier;
+
+import com.puppycrawl.*;
+
+public class InputVisibilityModifierIsStarImport {
+}