1 package com.puppycrawl.tools.checkstyle.checks.whitespace; 2 3 import com.puppycrawl.tools.checkstyle.BaseCheckTestCase; 4 import com.puppycrawl.tools.checkstyle.DefaultConfiguration; 5 6 public class EmptyForInitializerPadCheckTest 7 extends BaseCheckTestCase 8 { 9 private DefaultConfiguration mCheckConfig; 10 11 public void setUp() 12 { 13 mCheckConfig = createCheckConfig(EmptyForInitializerPadCheck.class); 14 } 15 16 public void testDefault() throws Exception 17 { 18 final String [] expected = { 19 "48:14: ';' is preceded with 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 "51:13: ';' is not preceded with whitespace.", 29 }; 30 verify(mCheckConfig, getPath("InputForWhitespace.java"), expected); 31 } 32 } 33 | Popular Tags |