fixes for checkstyle violations
This commit is contained in:
parent
93f02998d4
commit
40e445cbad
|
|
@ -25,41 +25,41 @@ import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
|
|||
|
||||
public class AnnotationLocationCheckTest extends BaseCheckTestSupport
|
||||
{
|
||||
@Test
|
||||
public void testCorrect() throws Exception
|
||||
{
|
||||
DefaultConfiguration checkConfig = createCheckConfig(AnnotationLocationCheck.class);
|
||||
final String[] expected = {
|
||||
};
|
||||
@Test
|
||||
public void testCorrect() throws Exception
|
||||
{
|
||||
DefaultConfiguration checkConfig = createCheckConfig(AnnotationLocationCheck.class);
|
||||
final String[] expected = {
|
||||
};
|
||||
|
||||
verify(checkConfig, getPath("annotation/InputCorrectAnnotationLocation.java"), expected);
|
||||
}
|
||||
verify(checkConfig, getPath("annotation/InputCorrectAnnotationLocation.java"), expected);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testIncorrect() throws Exception
|
||||
{
|
||||
DefaultConfiguration checkConfig = createCheckConfig(AnnotationLocationCheck.class);
|
||||
final String[] expected = {
|
||||
"6: Annotation 'MyAnnotation1' should be alone on line.",
|
||||
"10: Annotation 'MyAnnotation1' should be alone on line.",
|
||||
"16: Annotation 'MyAnnotation1' have incorrect indentation level 8, expected level should be 4.",
|
||||
"23: Annotation 'MyAnnotation1' have incorrect indentation level 8, expected level should be 4.",
|
||||
"26: Annotation 'MyAnnotation1' should be alone on line.",
|
||||
"26: Annotation 'MyAnnotation2' should be alone on line.",
|
||||
"29: Annotation 'MyAnnotation2' have incorrect indentation level 7, expected level should be 4.",
|
||||
"33: Annotation 'MyAnnotation2' have incorrect indentation level 8, expected level should be 4.",
|
||||
"34: Annotation 'MyAnnotation3' have incorrect indentation level 6, expected level should be 4.",
|
||||
"35: Annotation 'MyAnnotation4' have incorrect indentation level 10, expected level should be 4.",
|
||||
"38: Annotation 'MyAnnotation1' should be alone on line.",
|
||||
"44: Annotation 'MyAnnotation1' have incorrect indentation level 12, expected level should be 8.",
|
||||
"56: Annotation 'MyAnnotation2' have incorrect indentation level 12, expected level should be 8.",
|
||||
"60: Annotation 'MyAnnotation2' have incorrect indentation level 12, expected level should be 8.",
|
||||
"65: Annotation 'MyAnnotation2' have incorrect indentation level 7, expected level should be 4.",
|
||||
"68: Annotation 'MyAnnotation1' should be alone on line.",
|
||||
"80: Annotation 'MyAnnotation2' have incorrect indentation level 11, expected level should be 8.",
|
||||
"83: Annotation 'MyAnnotation2' have incorrect indentation level 10, expected level should be 8.",
|
||||
"92: Annotation 'MyAnnotation2' have incorrect indentation level 0, expected level should be 3.",
|
||||
};
|
||||
verify(checkConfig, getPath("annotation/InputIncorrectAnnotationLocation.java"), expected);
|
||||
}
|
||||
@Test
|
||||
public void testIncorrect() throws Exception
|
||||
{
|
||||
DefaultConfiguration checkConfig = createCheckConfig(AnnotationLocationCheck.class);
|
||||
final String[] expected = {
|
||||
"6: Annotation 'MyAnnotation1' should be alone on line.",
|
||||
"10: Annotation 'MyAnnotation1' should be alone on line.",
|
||||
"16: Annotation 'MyAnnotation1' have incorrect indentation level 8, expected level should be 4.",
|
||||
"23: Annotation 'MyAnnotation1' have incorrect indentation level 8, expected level should be 4.",
|
||||
"26: Annotation 'MyAnnotation1' should be alone on line.",
|
||||
"26: Annotation 'MyAnnotation2' should be alone on line.",
|
||||
"29: Annotation 'MyAnnotation2' have incorrect indentation level 7, expected level should be 4.",
|
||||
"33: Annotation 'MyAnnotation2' have incorrect indentation level 8, expected level should be 4.",
|
||||
"34: Annotation 'MyAnnotation3' have incorrect indentation level 6, expected level should be 4.",
|
||||
"35: Annotation 'MyAnnotation4' have incorrect indentation level 10, expected level should be 4.",
|
||||
"38: Annotation 'MyAnnotation1' should be alone on line.",
|
||||
"44: Annotation 'MyAnnotation1' have incorrect indentation level 12, expected level should be 8.",
|
||||
"56: Annotation 'MyAnnotation2' have incorrect indentation level 12, expected level should be 8.",
|
||||
"60: Annotation 'MyAnnotation2' have incorrect indentation level 12, expected level should be 8.",
|
||||
"65: Annotation 'MyAnnotation2' have incorrect indentation level 7, expected level should be 4.",
|
||||
"68: Annotation 'MyAnnotation1' should be alone on line.",
|
||||
"80: Annotation 'MyAnnotation2' have incorrect indentation level 11, expected level should be 8.",
|
||||
"83: Annotation 'MyAnnotation2' have incorrect indentation level 10, expected level should be 8.",
|
||||
"92: Annotation 'MyAnnotation2' have incorrect indentation level 0, expected level should be 3.",
|
||||
};
|
||||
verify(checkConfig, getPath("annotation/InputIncorrectAnnotationLocation.java"), expected);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue