diff options
author | rnveach <rveach02@gmail.com> | 2015-10-19 12:07:07 -0400 |
---|---|---|
committer | Roman Ivanov <ivanov-jr@mail.ru> | 2015-10-19 21:55:24 -0700 |
commit | f47587c9fb66cf46fbd2eb5691449cda6d551ecb (patch) | |
tree | 018ffdcab040aba9aa2301c44f66ddae0834972b /src/test/resources/com/puppycrawl/tools/checkstyle/checks/InputArrayTypeStyle.java | |
parent | 9c488c1f512ffcc58af433842c992bd3f85b2d63 (diff) | |
download | checkstyle-f47587c9fb66cf46fbd2eb5691449cda6d551ecb.tar.gz |
Issue #2161: unify test input locations for checks package
Diffstat (limited to 'src/test/resources/com/puppycrawl/tools/checkstyle/checks/InputArrayTypeStyle.java')
-rw-r--r-- | src/test/resources/com/puppycrawl/tools/checkstyle/checks/InputArrayTypeStyle.java | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/checks/InputArrayTypeStyle.java b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/InputArrayTypeStyle.java new file mode 100644 index 000000000..546afdaf2 --- /dev/null +++ b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/InputArrayTypeStyle.java @@ -0,0 +1,44 @@ +//////////////////////////////////////////////////////////////////////////////// +// Test case file for checkstyle. +// Created: 2001 +//////////////////////////////////////////////////////////////////////////////// +package com.puppycrawl.tools.checkstyle.checks; + +/** + * Test case for ArrayTypeStyle (Java vs C) + * @author lkuehne + **/ +public class InputArrayTypeStyle +{ + private int[] javaStyle = new int[0]; + private int cStyle[] = new int[0]; + + public static void mainJava(String[] aJavaStyle) + { + } + + public static void mainC(String aCStyle[]) + { + final int[] blah = new int[0]; + final boolean isOK1 = aCStyle instanceof String[]; + final boolean isOK2 = aCStyle instanceof java.lang.String[]; + final boolean isOK3 = blah instanceof int[]; + } + + public class Test + { + public Test[] + variable; + + public Test[] + getTests() + { // we shouldn't check methods because there is no alternatives. + return null; + } + + public Test[] getNewTest() + { + return null; + } + } +} |