added test for format property of IllegalType check.

This commit is contained in:
Oleg Sukhodolsky 2005-01-17 12:45:12 +00:00
parent 17067bf579
commit 197f90a552
1 changed files with 12 additions and 0 deletions

View File

@ -35,4 +35,16 @@ public class IllegalTypeCheckTest extends BaseCheckTestCase {
verify(checkConfig, getPath("coding" + File.separator + "InputIllegalType.java"), expected);
}
public void testFormat() throws Exception {
DefaultConfiguration checkConfig = createCheckConfig(IllegalTypeCheck.class);
checkConfig.addAttribute("format", "^$");
String[] expected = {
"16:13: Declaring variables, return values or parameters of type 'java.util.Hashtable' is not allowed.",
"17:13: Declaring variables, return values or parameters of type 'Hashtable' is not allowed.",
};
verify(checkConfig, getPath("coding" + File.separator + "InputIllegalType.java"), expected);
}
}