aboutsummaryrefslogtreecommitdiff
path: root/src/test/resources/com/puppycrawl/tools/checkstyle/checks/indentation/InputLabels.java
blob: 5e8ab66317ffa124630103d51e8aa23ba49e1eee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
package com.puppycrawl.tools.checkstyle.checks.indentation; //indent:0 exp:0

/**                                                                           //indent:0 exp:0
 * This test-input is intended to be checked using following configuration:   //indent:1 exp:1
 *                                                                            //indent:1 exp:1
 * arrayInitIndent = 4                                                        //indent:1 exp:1
 * basicOffset = 2                                                            //indent:1 exp:1
 * braceAdjustment = 0                                                        //indent:1 exp:1
 * caseIndent = 4                                                             //indent:1 exp:1
 * forceStrictCondition = false                                               //indent:1 exp:1
 * lineWrappingIndentation = 4                                                //indent:1 exp:1
 * tabWidth = 4                                                               //indent:1 exp:1
 * throwsIndent = 4                                                           //indent:1 exp:1
 *                                                                            //indent:1 exp:1
 *                                                                            //indent:1 exp:1
 */                                                                           //indent:1 exp:1
class InputLabels { //indent:0 exp:0
  void foo() { //indent:2 exp:2
//    OUT: //indent:0 exp:0
    while (true) { //indent:4 exp:4
    } //indent:4 exp:4
  } //indent:2 exp:2

  void foo2() { //indent:2 exp:2
    positions: while (true) { //indent:4 exp:4
    } //indent:4 exp:4
  } //indent:2 exp:2

  void foo3() { //indent:2 exp:2
    OUT1: //indent:4 exp:4
    for (;;) { //indent:4 exp:4
      if (true){ //indent:6 exp:6
        break OUT1; //indent:8 exp:8
      } //indent:6 exp:6
    } //indent:4 exp:4
  } //indent:2 exp:2

  void foo4() { //indent:2 exp:2
    OUT1: for (;;) { //indent:4 exp:4
      if (true){ //indent:6 exp:6
        break OUT1; //indent:8 exp:8
      } //indent:6 exp:6
    } //indent:4 exp:4
  } //indent:2 exp:2

  void fooo() { //indent:2 exp:2
    IN: if (true) { //indent:4 exp:4
    } //indent:4 exp:4
  } //indent:2 exp:2

  void fooo1() { //indent:2 exp:2
    IN: //indent:4 exp:4
    if (true) { //indent:4 exp:4
    } //indent:4 exp:4
  } //indent:2 exp:2

  void foooo() { //indent:2 exp:2
    IN: do {} while (true); //indent:4 exp:4
  } //indent:2 exp:2

  void foooo1() { //indent:2 exp:2
    IN: //indent:4 exp:4
    do {} while (true); //indent:4 exp:4
  } //indent:2 exp:2

  class Inner { //indent:2 exp:2
    void foo() { //indent:4 exp:4
      OUT: while (true) { //indent:6 exp:6
      } //indent:6 exp:6
    } //indent:4 exp:4

    void foo2() { //indent:4 exp:4
      positions: //indent:6 exp:6
      while (true) { //indent:6 exp:6
      } //indent:6 exp:6
    } //indent:4 exp:4

    void foo5() { //indent:4 exp:4
      OUT1: //indent:6 exp:6
      for (;;) { //indent:6 exp:6
        if (true){ //indent:8 exp:8
          break OUT1; //indent:10 exp:10
        } //indent:8 exp:8
      } //indent:6 exp:6
    } //indent:4 exp:4

    void foo6() { //indent:4 exp:4
      OUT1: for (;;) { //indent:6 exp:6
        if (true){ //indent:8 exp:8
          break OUT1; //indent:10 exp:10
        } //indent:8 exp:8
      } //indent:6 exp:6
    } //indent:4 exp:4

    void fooo11() { //indent:4 exp:4
      IN: if (true) { //indent:6 exp:6
      } //indent:6 exp:6
    } //indent:4 exp:4

    void fooo12() { //indent:4 exp:4
      IN: //indent:6 exp:6
      if (true) { //indent:6 exp:6
      } //indent:6 exp:6
    } //indent:4 exp:4

    void foooo3() { //indent:4 exp:4
      IN: do {} while (true); //indent:6 exp:6
    } //indent:4 exp:4

    void foooo4() { //indent:4 exp:4
      IN: //indent:6 exp:6
      do {} while (true); //indent:6 exp:6
    } //indent:4 exp:4
  } //indent:2 exp:2

  InputLabels anon = new InputLabels() { //indent:2 exp:2
    void foo() { //indent:4 exp:4
      OUT: while (true) { //indent:6 exp:6
      } //indent:6 exp:6
    } //indent:4 exp:4

    void foo2() { //indent:4 exp:4
      positions: //indent:6 exp:6
      while (true) { //indent:6 exp:6
      } //indent:6 exp:6
    } //indent:4 exp:4

    void foo5() { //indent:4 exp:4
      OUT1: //indent:6 exp:6
      for (;;) { //indent:6 exp:6
        if (true){ //indent:8 exp:8
          break OUT1; //indent:10 exp:10
        } //indent:8 exp:8
      } //indent:6 exp:6
    } //indent:4 exp:4

    void foo6() { //indent:4 exp:4
      OUT1: for (;;) { //indent:6 exp:6
        if (true){ //indent:8 exp:8
          break OUT1; //indent:10 exp:10
        } //indent:8 exp:8
      } //indent:6 exp:6
    } //indent:4 exp:4

    void fooo11() { //indent:4 exp:4
      IN: if (true) { //indent:6 exp:6
      } //indent:6 exp:6
    } //indent:4 exp:4

    void fooo12() { //indent:4 exp:4
      IN: //indent:6 exp:6
      if (true) { //indent:6 exp:6
      } //indent:6 exp:6
    } //indent:4 exp:4

    void foooo3() { //indent:4 exp:4
      IN: do {} while (true); //indent:6 exp:6
    } //indent:4 exp:4

    void foooo4() { //indent:4 exp:4
      IN: //indent:6 exp:6
      do {} while (true); //indent:6 exp:6
    } //indent:4 exp:4
  }; //indent:2 exp:2
} //indent:0 exp:0