Coverage has been increased to 100% in UpperEllCheck
This commit is contained in:
parent
10521b417e
commit
fa9ece71f4
1
pom.xml
1
pom.xml
|
|
@ -1109,7 +1109,6 @@
|
|||
<regex><pattern>.*.checks.TranslationCheck</pattern><branchRate>81</branchRate><lineRate>83</lineRate></regex>
|
||||
<regex><pattern>.*.checks.UncommentedMainCheck</pattern><branchRate>83</branchRate><lineRate>88</lineRate></regex>
|
||||
<regex><pattern>.*.checks.UniquePropertiesCheck\$.*</pattern><branchRate>75</branchRate><lineRate>90</lineRate></regex>
|
||||
<regex><pattern>.*.checks.UpperEllCheck</pattern><branchRate>100</branchRate><lineRate>83</lineRate></regex>
|
||||
|
||||
|
||||
<regex><pattern>.*.checks.annotation.AnnotationLocationCheck</pattern><branchRate>75</branchRate><lineRate>78</lineRate></regex>
|
||||
|
|
|
|||
|
|
@ -19,11 +19,15 @@
|
|||
|
||||
package com.puppycrawl.tools.checkstyle.checks;
|
||||
|
||||
import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
|
||||
import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
|
||||
import static com.puppycrawl.tools.checkstyle.checks.UpperEllCheck.MSG_KEY;
|
||||
import static org.junit.Assert.assertArrayEquals;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import static com.puppycrawl.tools.checkstyle.checks.UpperEllCheck.MSG_KEY;
|
||||
import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
|
||||
import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
|
||||
import com.puppycrawl.tools.checkstyle.api.TokenTypes;
|
||||
|
||||
public class UpperEllCheckTest
|
||||
extends BaseCheckTestSupport {
|
||||
|
|
@ -37,4 +41,13 @@ public class UpperEllCheckTest
|
|||
};
|
||||
verify(checkConfig, getPath("InputSemantic.java"), expected);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAcceptableTockens() {
|
||||
int[] expected = {TokenTypes.NUM_LONG };
|
||||
UpperEllCheck check = new UpperEllCheck();
|
||||
int[] actual = check.getAcceptableTokens();
|
||||
assertTrue(actual.length == 1);
|
||||
assertArrayEquals(expected, actual);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue