diff options
author | vasilyeva <vasilyeva@rutarget.ru> | 2017-08-30 22:01:21 +0300 |
---|---|---|
committer | Roman Ivanov <romani@users.noreply.github.com> | 2017-08-30 17:20:44 -0700 |
commit | d97519f448b8350510de94cdb9948527e33d5473 (patch) | |
tree | 775bd4b54620ac9d845091cf22d17c13e63d35c0 /src/test/resources/com | |
parent | fc44df83dfaecd3d7b08ae41f6a88a958d38cf60 (diff) | |
download | checkstyle-d97519f448b8350510de94cdb9948527e33d5473.tar.gz |
Issue #5007: increase coverage of pitest-checks-design to 100%
Diffstat (limited to 'src/test/resources/com')
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 { +} |