Issue #1293: One more unit test for PackageDeclarationCheck.
This commit is contained in:
parent
95eb2122d5
commit
6e1b8917c1
1
pom.xml
1
pom.xml
|
|
@ -1113,7 +1113,6 @@
|
|||
<regex><pattern>.*.checks.coding.MultipleStringLiteralsCheck</pattern><branchRate>90</branchRate><lineRate>96</lineRate></regex>
|
||||
<regex><pattern>.*.checks.coding.MultipleVariableDeclarationsCheck</pattern><branchRate>96</branchRate><lineRate>100</lineRate></regex>
|
||||
<regex><pattern>.*.checks.coding.OverloadMethodsDeclarationOrderCheck</pattern><branchRate>93</branchRate><lineRate>100</lineRate></regex>
|
||||
<regex><pattern>.*.checks.coding.PackageDeclarationCheck</pattern><branchRate>75</branchRate><lineRate>85</lineRate></regex>
|
||||
<regex><pattern>.*.checks.coding.ParameterAssignmentCheck</pattern><branchRate>80</branchRate><lineRate>96</lineRate></regex>
|
||||
<regex><pattern>.*.checks.coding.ReturnCountCheck</pattern><branchRate>55</branchRate><lineRate>74</lineRate></regex>
|
||||
<regex><pattern>.*.checks.coding.SimplifyBooleanReturnCheck</pattern><branchRate>83</branchRate><lineRate>100</lineRate></regex>
|
||||
|
|
|
|||
|
|
@ -50,7 +50,17 @@ public class PackageDeclarationCheckTest extends BaseCheckTestSupport {
|
|||
"1: " + getCheckMessage(MSG_KEY),
|
||||
};
|
||||
|
||||
verify(checkConfig, getPath("InputWithCommentOnly.java"), expected);
|
||||
verify(checkConfig, getPath("coding/InputWithCommentOnly.java"), expected);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCorrectFile() throws Exception {
|
||||
DefaultConfiguration checkConfig = createCheckConfig(PackageDeclarationCheck.class);
|
||||
|
||||
String[] expected = {
|
||||
};
|
||||
|
||||
verify(checkConfig, getPath("coding/InputPackageDeclaration.java"), expected);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
|||
|
|
@ -0,0 +1,8 @@
|
|||
package com.puppycrawl.tools.checkstyle.checks.coding;
|
||||
|
||||
class InputPackageDeclaration {
|
||||
public String value;
|
||||
|
||||
private void get(){
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue