01: package com.puppycrawl.tools.checkstyle.checks.modifier;
02:
03: import com.puppycrawl.tools.checkstyle.BaseCheckTestCase;
04: import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
05:
06: public class ModifierOrderCheckTest extends BaseCheckTestCase {
07: public void testIt() throws Exception {
08: final DefaultConfiguration checkConfig = createCheckConfig(ModifierOrderCheck.class);
09: final String[] expected = {
10: "14:10: 'final' modifier out of order with the JLS suggestions.",
11: "18:12: 'private' modifier out of order with the JLS suggestions.",
12: "24:14: 'private' modifier out of order with the JLS suggestions.",
13: "34:13: '@MyAnnotation2' annotation modifier does not preceed non-annotation modifiers.",
14: "39:13: '@MyAnnotation2' annotation modifier does not preceed non-annotation modifiers.",
15: "49:35: '@MyAnnotation4' annotation modifier does not preceed non-annotation modifiers.", };
16: verify(checkConfig, getPath("InputModifier.java"), expected);
17: }
18: }
|