File tree Expand file tree Collapse file tree
error-prone-contrib/src/test/java/tech/picnic/errorprone/bugpatterns Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11package tech .picnic .errorprone .bugpatterns ;
22
3+ import static com .google .common .base .Predicates .and ;
4+ import static com .google .common .base .Predicates .containsPattern ;
35import static com .google .errorprone .BugCheckerRefactoringTestHelper .FixChoosers .SECOND ;
46
57import com .google .errorprone .BugCheckerRefactoringTestHelper ;
@@ -11,10 +13,16 @@ final class MemberOrderingTest {
1113 @ Test
1214 void identification () {
1315 CompilationTestHelper .newInstance (MemberOrdering .class , getClass ())
16+ .expectErrorMessage (
17+ "MemberOrdering" ,
18+ and (
19+ containsPattern ("SuppressWarnings" ),
20+ containsPattern (
21+ "Members, constructors and methods should follow standard ordering." )))
1422 .addSourceLines (
1523 "A.java" ,
1624 "" ,
17- "// BUG: Diagnostic contains: " ,
25+ "// BUG: Diagnostic matches: MemberOrdering " ,
1826 "class A {" ,
1927 " char a = 'a';" ,
2028 " private static String FOO = \" foo\" ;" ,
@@ -57,7 +65,8 @@ void identification() {
5765 "" ,
5866 " class Inner {}" ,
5967 " static class StaticInner {}" ,
60- "}" );
68+ "}" )
69+ .doTest ();
6170 }
6271
6372 @ Test
You can’t perform that action at this time.
0 commit comments