1   ////////////////////////////////////////////////////////////////////////////////
2   // Test case file for checkstyle.
3   // Created: 2001
4   ////////////////////////////////////////////////////////////////////////////////
5   package com.puppycrawl.tools.checkstyle.checks.arraytypestyle;
6   
7   /**
8    * Test case for ArrayTypeStyle (Java vs C)
9    * @author lkuehne
10   **/
11  public class InputArrayTypeStyle
12  {
13      private int[] javaStyle = new int[0];
14      private int cStyle[] = new int[0];
15      private int c[] = new int[0];
16  
17      public static void mainJava(String[] aJavaStyle)
18      {
19      }
20  
21      public static void mainC(String aCStyle[])
22      {
23          final int[] blah = new int[0];
24          final boolean isOK1 = aCStyle instanceof String[];
25          final boolean isOK2 = aCStyle instanceof java.lang.String[];
26          final boolean isOK3 = blah instanceof int[];
27      }
28  
29      public class Test
30      {
31          public Test[]
32              variable;
33  
34          public Test[]
35              getTests()
36          {
37              return null;
38          }
39  
40          public Test[] getNewTest()
41          {
42              return null;
43          }
44  
45          public Test getOldTest()[]
46          {
47              return null;
48          }
49  
50          public Test getOldTests()[][]
51          {
52              return null;
53          }
54  
55          public Test[]
56              getMoreTests()[][]
57          {
58              return null;
59          }
60  
61          public Test[][] getTests2()
62          {
63              return null;
64          }
65      }
66      public static void foo(java.util.Collection < ? extends InputArrayTypeStyle[] > collection) {}
67  }