01: package com.puppycrawl.tools.checkstyle.bcel.checks;
02:
03: import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
04: import com.puppycrawl.tools.checkstyle.bcel.BcelCheckTestCase;
05:
06: public class HiddenInheritedFieldTest extends BcelCheckTestCase {
07: public void testIt() throws Exception {
08: final DefaultConfiguration checkConfig = createCheckConfig(HiddenInheritedFieldCheck.class);
09:
10: final String[] expected = {
11: "0: Field 'private int subClassPrivate' hides field in class 'com.puppycrawl.tools.checkstyle.bcel.checks.SuperClass'.",
12: "0: Field 'protected int differentType' hides field in class 'com.puppycrawl.tools.checkstyle.bcel.checks.SuperClass'.",
13: "0: Field 'protected int reusedName' hides field in class 'com.puppycrawl.tools.checkstyle.bcel.checks.SuperClass'.", };
14: verify(
15: checkConfig,
16: getPath("com\\puppycrawl\\tools\\checkstyle\\bcel\\checks\\SubClass.class"),
17: expected);
18: }
19: }
|