01: package com.puppycrawl.tools.checkstyle.checks.whitespace;
02:
03: import com.puppycrawl.tools.checkstyle.BaseCheckTestCase;
04: import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
05:
06: public class EmptyForInitializerPadCheckTest extends BaseCheckTestCase {
07: private DefaultConfiguration mCheckConfig;
08:
09: public void setUp() {
10: mCheckConfig = createCheckConfig(EmptyForInitializerPadCheck.class);
11: }
12:
13: public void testDefault() throws Exception {
14: final String[] expected = { "48:14: ';' is preceded with whitespace.", };
15: verify(mCheckConfig, getPath("InputForWhitespace.java"),
16: expected);
17: }
18:
19: public void testSpaceOption() throws Exception {
20: mCheckConfig.addAttribute("option", PadOption.SPACE.toString());
21: final String[] expected = { "51:13: ';' is not preceded with whitespace.", };
22: verify(mCheckConfig, getPath("InputForWhitespace.java"),
23: expected);
24: }
25: }
|