KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > puppycrawl > tools > checkstyle > checks > coding > SimplifyBooleanExpressionCheckTest


1 package com.puppycrawl.tools.checkstyle.checks.coding;
2
3 import com.puppycrawl.tools.checkstyle.BaseCheckTestCase;
4 import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
5
6 public class SimplifyBooleanExpressionCheckTest
7     extends BaseCheckTestCase
8 {
9     public void testIt()
10             throws Exception JavaDoc
11     {
12         final DefaultConfiguration checkConfig =
13             createCheckConfig(SimplifyBooleanExpressionCheck.class);
14         final String JavaDoc[] expected = {
15             "20:18: Expression can be simplified.",
16             "41:36: Expression can be simplified.",
17             "42:36: Expression can be simplified.",
18             "43:16: Expression can be simplified.",
19             "43:32: Expression can be simplified.",
20         };
21         verify(checkConfig, getPath("InputSimplifyBoolean.java"), expected);
22     }
23 }
24
Popular Tags