1 package com.puppycrawl.tools.checkstyle.bcel.checks; 2 3 import com.puppycrawl.tools.checkstyle.DefaultConfiguration; 4 import com.puppycrawl.tools.checkstyle.bcel.BcelCheckTestCase; 5 6 public class HiddenInheritedFieldTest 7 extends BcelCheckTestCase 8 { 9 public void testIt() 10 throws Exception 11 { 12 final DefaultConfiguration checkConfig = 13 createCheckConfig(HiddenInheritedFieldCheck.class); 14 15 final String [] expected = { 16 "0: Field 'private int subClassPrivate' hides field in class 'com.puppycrawl.tools.checkstyle.bcel.checks.SuperClass'.", 17 "0: Field 'protected int differentType' hides field in class 'com.puppycrawl.tools.checkstyle.bcel.checks.SuperClass'.", 18 "0: Field 'protected int reusedName' hides field in class 'com.puppycrawl.tools.checkstyle.bcel.checks.SuperClass'.", 19 }; 20 verify(checkConfig, getPath("com\\puppycrawl\\tools\\checkstyle\\bcel\\checks\\SubClass.class"), expected); 21 } 22 } 23 | Popular Tags |