View Javadoc
1   package com.puppycrawl.tools.checkstyle.checks.indentation.indentation; //indent:0 exp:0
2   
3   /**                                                                           //indent:0 exp:0
4    * This test-input is intended to be checked using following configuration:   //indent:1 exp:1
5    *                                                                            //indent:1 exp:1
6    * arrayInitIndent = 4                                                        //indent:1 exp:1
7    * basicOffset = 2                                                            //indent:1 exp:1
8    * braceAdjustment = 0                                                        //indent:1 exp:1
9    * caseIndent = 4                                                             //indent:1 exp:1
10   * forceStrictCondition = false                                               //indent:1 exp:1
11   * lineWrappingIndentation = 4                                                //indent:1 exp:1
12   * tabWidth = 4                                                               //indent:1 exp:1
13   * throwsIndent = 4                                                           //indent:1 exp:1
14   *                                                                            //indent:1 exp:1
15   *                                                                            //indent:1 exp:1
16   */                                                                           //indent:1 exp:1
17  class InputIndentationLabels { //indent:0 exp:0
18    void foo() { //indent:2 exp:2
19  //    OUT: //indent:0 exp:0
20      while (true) { //indent:4 exp:4
21      } //indent:4 exp:4
22    } //indent:2 exp:2
23  
24    void foo2() { //indent:2 exp:2
25      positions: while (true) { //indent:4 exp:4
26      } //indent:4 exp:4
27    } //indent:2 exp:2
28  
29    void foo3() { //indent:2 exp:2
30      OUT1: //indent:4 exp:4
31      for (;;) { //indent:4 exp:4
32        if (true){ //indent:6 exp:6
33          break OUT1; //indent:8 exp:8
34        } //indent:6 exp:6
35      } //indent:4 exp:4
36    } //indent:2 exp:2
37  
38    void foo4() { //indent:2 exp:2
39      OUT1: for (;;) { //indent:4 exp:4
40        if (true){ //indent:6 exp:6
41          break OUT1; //indent:8 exp:8
42        } //indent:6 exp:6
43      } //indent:4 exp:4
44    } //indent:2 exp:2
45  
46    void fooo() { //indent:2 exp:2
47      IN: if (true) { //indent:4 exp:4
48      } //indent:4 exp:4
49    } //indent:2 exp:2
50  
51    void fooo1() { //indent:2 exp:2
52      IN: //indent:4 exp:4
53      if (true) { //indent:4 exp:4
54      } //indent:4 exp:4
55    } //indent:2 exp:2
56  
57    void foooo() { //indent:2 exp:2
58      IN: do {} while (true); //indent:4 exp:4
59    } //indent:2 exp:2
60  
61    void foooo1() { //indent:2 exp:2
62      IN: //indent:4 exp:4
63      do {} while (true); //indent:4 exp:4
64    } //indent:2 exp:2
65  
66    class Inner { //indent:2 exp:2
67      void foo() { //indent:4 exp:4
68        OUT: while (true) { //indent:6 exp:6
69        } //indent:6 exp:6
70      } //indent:4 exp:4
71  
72      void foo2() { //indent:4 exp:4
73        positions: //indent:6 exp:6
74        while (true) { //indent:6 exp:6
75        } //indent:6 exp:6
76      } //indent:4 exp:4
77  
78      void foo5() { //indent:4 exp:4
79        OUT1: //indent:6 exp:6
80        for (;;) { //indent:6 exp:6
81          if (true){ //indent:8 exp:8
82            break OUT1; //indent:10 exp:10
83          } //indent:8 exp:8
84        } //indent:6 exp:6
85      } //indent:4 exp:4
86  
87      void foo6() { //indent:4 exp:4
88        OUT1: for (;;) { //indent:6 exp:6
89          if (true){ //indent:8 exp:8
90            break OUT1; //indent:10 exp:10
91          } //indent:8 exp:8
92        } //indent:6 exp:6
93      } //indent:4 exp:4
94  
95      void fooo11() { //indent:4 exp:4
96        IN: if (true) { //indent:6 exp:6
97        } //indent:6 exp:6
98      } //indent:4 exp:4
99  
100     void fooo12() { //indent:4 exp:4
101       IN: //indent:6 exp:6
102       if (true) { //indent:6 exp:6
103       } //indent:6 exp:6
104     } //indent:4 exp:4
105 
106     void foooo3() { //indent:4 exp:4
107       IN: do {} while (true); //indent:6 exp:6
108     } //indent:4 exp:4
109 
110     void foooo4() { //indent:4 exp:4
111       IN: //indent:6 exp:6
112       do {} while (true); //indent:6 exp:6
113     } //indent:4 exp:4
114   } //indent:2 exp:2
115 
116   InputIndentationLabels anon = new InputIndentationLabels() { //indent:2 exp:2
117     void foo() { //indent:4 exp:4
118       OUT: while (true) { //indent:6 exp:6
119       } //indent:6 exp:6
120     } //indent:4 exp:4
121 
122     void foo2() { //indent:4 exp:4
123       positions: //indent:6 exp:6
124       while (true) { //indent:6 exp:6
125       } //indent:6 exp:6
126     } //indent:4 exp:4
127 
128     void foo5() { //indent:4 exp:4
129       OUT1: //indent:6 exp:6
130       for (;;) { //indent:6 exp:6
131         if (true){ //indent:8 exp:8
132           break OUT1; //indent:10 exp:10
133         } //indent:8 exp:8
134       } //indent:6 exp:6
135     } //indent:4 exp:4
136 
137     void foo6() { //indent:4 exp:4
138       OUT1: for (;;) { //indent:6 exp:6
139         if (true){ //indent:8 exp:8
140           break OUT1; //indent:10 exp:10
141         } //indent:8 exp:8
142       } //indent:6 exp:6
143     } //indent:4 exp:4
144 
145     void fooo11() { //indent:4 exp:4
146       IN: if (true) { //indent:6 exp:6
147       } //indent:6 exp:6
148     } //indent:4 exp:4
149 
150     void fooo12() { //indent:4 exp:4
151       IN: //indent:6 exp:6
152       if (true) { //indent:6 exp:6
153       } //indent:6 exp:6
154     } //indent:4 exp:4
155 
156     void foooo3() { //indent:4 exp:4
157       IN: do {} while (true); //indent:6 exp:6
158     } //indent:4 exp:4
159 
160     void foooo4() { //indent:4 exp:4
161       IN: //indent:6 exp:6
162       do {} while (true); //indent:6 exp:6
163     } //indent:4 exp:4
164   }; //indent:2 exp:2
165 } //indent:0 exp:0