KickJava   Java API By Example, From Geeks To Geeks.

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


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 ModifiedControlVariableCheckTest
7     extends BaseCheckTestCase
8 {
9     public void testModifiedControlVariable() throws Exception JavaDoc {
10         final DefaultConfiguration checkConfig =
11             createCheckConfig(ModifiedControlVariableCheck.class);
12         final String JavaDoc[] expected = {
13             "14:14: Control variable 'i' is modified.",
14             "17:15: Control variable 'i' is modified.",
15             "20:37: Control variable 'i' is modified.",
16             "21:17: Control variable 'i' is modified.",
17             "25:14: Control variable 'j' is modified.",
18             "49:15: Control variable 's' is modified.",
19         };
20         verify(checkConfig, getPath("coding/InputModifiedControl.java"), expected);
21     }
22 }
23
Popular Tags