forked from checkstyle/checkstyle
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue checkstyle#3976: EmptyForIteratorPad input test organise and split
- Loading branch information
1 parent
56064e7
commit 33ff792
Showing
2 changed files
with
63 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
...rawl/tools/checkstyle/checks/whitespace/emptyforiteratorpad/InputEmptyForIteratorPad.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
//////////////////////////////////////////////////////////////////////////////// | ||
// Test case file for FOR_ITERATION. | ||
// Created: 2003 | ||
//////////////////////////////////////////////////////////////////////////////// | ||
package com.puppycrawl.tools.checkstyle.checks.whitespace.emptyforiteratorpad; | ||
|
||
class InputEmptyForIteratorPad | ||
{ | ||
void method1() | ||
{ | ||
for (int i = 0; i < 1; i++) { | ||
} | ||
|
||
for (int i = 0; i < 1;i++) { | ||
} | ||
|
||
for (int i = 0; i < 1;i++ ) { | ||
} | ||
|
||
for (int i = 0; i < 1; i++ ) { | ||
} | ||
|
||
for (int i = 0; i < 1;) { | ||
i++; | ||
} | ||
|
||
for (int i = 0; i < 1; ) { | ||
i++; | ||
} | ||
|
||
// test eol, there is no space after second SEMI | ||
for (int i = 0; i < 1; | ||
) { | ||
i++; | ||
} | ||
} | ||
|
||
void method2() | ||
{ | ||
for ( int i = 0; i < 1; i++ ) { | ||
} | ||
|
||
for ( int i = 0; i < 1; ) { | ||
i++; | ||
} | ||
|
||
int i = 0; | ||
for ( ; i < 1; i++ ) { | ||
} | ||
|
||
for (; i < 2; i++ ) { | ||
} | ||
|
||
for ( | ||
;; ) { | ||
} | ||
} | ||
} |