Skip to content

Commit

Permalink
Add more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cernat-catalin committed Feb 14, 2023
1 parent d1ec125 commit 0e427ff
Showing 1 changed file with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,13 @@ void identification() {
"",
" public static class INSTANCE {}",
"}")
.addSourceLines("MAX_VALUE.java", "", "public final class MAX_VALUE {}")
.addSourceLines(
"pkg/A.java",
"package pkg;",
"",
"import static com.google.common.collect.ImmutableList.copyOf;",
"import static java.lang.Integer.MAX_VALUE;",
"import static java.lang.Integer.MIN_VALUE;",
"import static java.time.Clock.systemUTC;",
"import static java.time.Instant.MAX;",
Expand Down Expand Up @@ -123,9 +125,20 @@ void identification() {
"",
" // Not flagged because identifier is not statically imported.",
" Object inst = new INSTANCE();",
"",
" Integer from = 12;",
" // Not flagged because identifier is not statically imported.",
" Integer i3 = from;",
"",
" // Not flagged because identifier does not belong to a type.",
" MAX_VALUE maxValue = new MAX_VALUE();",
" }",
"",
" void create() {}",
" void create() {",
" Integer MIN_VALUE = 12;",
" // Not flagged because identifier is not statically imported.",
" Integer i1 = MIN_VALUE;",
" }",
"}")
.doTest();
}
Expand Down

0 comments on commit 0e427ff

Please sign in to comment.