KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > puppycrawl > tools > checkstyle > InputOpWrap


1 ////////////////////////////////////////////////////////////////////////////////
2
// Test case file for checkstyle.
3
// Created: 2001
4
////////////////////////////////////////////////////////////////////////////////
5
package com.puppycrawl.tools.checkstyle;
6
7 /**
8  * Test case for detecting operator wrapping.
9  * @author Lars K�hne
10  **/

11 class InputOpWrap
12 {
13     void test()
14     {
15         int x = 1 +
16             2 -
17             3
18             -
19             4;
20         x = x + 2;
21         boolean y = true
22             &&
23             false;
24         y = true &&
25             false;
26         y = false
27             && true;
28     }
29     
30     void testAssignment()
31     {
32         int x
33             = 0; //error when checking assignment operators with EOL wrap option
34
int y =
35             0;
36     }
37     
38     <
39         T extends Comparable JavaDoc &
40         java.io.Serializable JavaDoc
41     >
42     void testGenerics1()
43     {
44         Comparable JavaDoc
45             <
46             String JavaDoc
47             >
48             c = new String JavaDoc();
49     }
50 }
51
Popular Tags