| Home >> All >> com >> puppycrawl >> tools >> checkstyle >> [ checks Javadoc ] |
Source code: com/puppycrawl/tools/checkstyle/checks/EmptyForIteratorPadCheckTest.java
1 package com.puppycrawl.tools.checkstyle.checks; 2 3 import com.puppycrawl.tools.checkstyle.BaseCheckTestCase; 4 import com.puppycrawl.tools.checkstyle.DefaultConfiguration; 5 6 public class EmptyForIteratorPadCheckTest 7 extends BaseCheckTestCase 8 { 9 private DefaultConfiguration mCheckConfig; 10 11 public void setUp() 12 { 13 mCheckConfig = createCheckConfig(EmptyForIteratorPadCheck.class); 14 } 15 16 public void testDefault() throws Exception 17 { 18 final String[] expected = { 19 "27:31: ';' is followed by whitespace.", 20 }; 21 verify(mCheckConfig, getPath("InputForWhitespace.java"), expected); 22 } 23 24 public void testSpaceOption() throws Exception 25 { 26 mCheckConfig.addAttribute("option", PadOption.SPACE.toString()); 27 final String[] expected = { 28 "23:30: ';' is not followed by whitespace.", 29 }; 30 verify(mCheckConfig, getPath("InputForWhitespace.java"), expected); 31 } 32 }