-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
123 additions
and
251 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
317 changes: 95 additions & 222 deletions
317
...pport/src/test/java/tech/picnic/errorprone/documentation/BugPatternTestExtractorTest.java
Large diffs are not rendered by default.
Oops, something went wrong.
10 changes: 5 additions & 5 deletions
10
...rrorprone/documentation/bugpattern-test-documentation-identification-and-replacement.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
{ | ||
"name": "IdentityConversion", | ||
"name": "TestChecker", | ||
"identificationTests": [ | ||
"public final class A {\n public void m() {\n // BUG: Diagnostic contains:\n Boolean b = Boolean.valueOf(Boolean.FALSE);\n}\n}\n" | ||
"class A {}\n" | ||
], | ||
"replacementTests": [ | ||
{ | ||
"inputLines": "import com.google.common.collect.ImmutableSet;\n\npublic final class A {\n public void m() {\n ImmutableSet<Object> set = ImmutableSet.copyOf(ImmutableSet.of());\n }\n}\n", | ||
"outputLines": "import com.google.common.collect.ImmutableSet;\n\npublic final class A {\n public void m() {\n ImmutableSet<Object> set = ImmutableSet.of();\n }\n}\n" | ||
"inputLines": "class A {}\n", | ||
"outputLines": "class A {}\n" | ||
} | ||
] | ||
} | ||
} |
6 changes: 3 additions & 3 deletions
6
...ic/errorprone/documentation/bugpattern-test-documentation-identification-two-sources.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
{ | ||
"name": "IdentityConversion", | ||
"name": "TestChecker", | ||
"identificationTests": [ | ||
"public final class B {}\n", | ||
"public final class A {}\n" | ||
"class B {}\n", | ||
"class A {}\n" | ||
], | ||
"replacementTests": [] | ||
} |
4 changes: 2 additions & 2 deletions
4
...es/tech/picnic/errorprone/documentation/bugpattern-test-documentation-identification.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"name": "IdentityConversion", | ||
"name": "TestChecker", | ||
"identificationTests": [ | ||
"public final class A {\n public void m() {\n // BUG: Diagnostic contains:\n Boolean b = Boolean.valueOf(Boolean.FALSE);\n}\n}\n" | ||
"class A {}\n" | ||
], | ||
"replacementTests": [] | ||
} |
2 changes: 1 addition & 1 deletion
2
...resources/tech/picnic/errorprone/documentation/bugpattern-test-documentation-minimal.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"name": "IdentityConversion", | ||
"name": "TestChecker", | ||
"identificationTests": [], | ||
"replacementTests": [] | ||
} |
14 changes: 7 additions & 7 deletions
14
.../documentation/bugpattern-test-documentation-multiple-identification-and-replacement.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
{ | ||
"name": "IdentityConversion", | ||
"name": "TestChecker", | ||
"identificationTests": [ | ||
"public final class A {\n public void m() {\n // BUG: Diagnostic contains:\n Boolean b = Boolean.valueOf(Boolean.FALSE);\n}\n}\n", | ||
"public final class B {\n public void m() {\n // BUG: Diagnostic contains:\n Boolean b = Boolean.valueOf(Boolean.FALSE);\n}\n}\n" | ||
"class A {}\n", | ||
"class B {}\n" | ||
], | ||
"replacementTests": [ | ||
{ | ||
"inputLines": "import com.google.common.collect.ImmutableSet;\n\npublic final class A {\n public void m() {\n ImmutableSet<Object> set = ImmutableSet.copyOf(ImmutableSet.of());\n }\n}\n", | ||
"outputLines": "import com.google.common.collect.ImmutableSet;\n\npublic final class A {\n public void m() {\n ImmutableSet<Object> set = ImmutableSet.of();\n }\n}\n" | ||
"inputLines": "class A {}\n", | ||
"outputLines": "class A {}\n" | ||
}, | ||
{ | ||
"inputLines": "import com.google.common.collect.ImmutableSet;\n\npublic final class B {\n public void m() {\n ImmutableSet<Object> set = ImmutableSet.copyOf(ImmutableSet.of());\n }\n}\n", | ||
"outputLines": "import com.google.common.collect.ImmutableSet;\n\npublic final class B {\n public void m() {\n ImmutableSet<Object> set = ImmutableSet.of();\n }\n}\n" | ||
"inputLines": "class B {}\n", | ||
"outputLines": "class B {}\n" | ||
} | ||
] | ||
} |
4 changes: 2 additions & 2 deletions
4
.../errorprone/documentation/bugpattern-test-documentation-replacement-expect-unchanged.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 5 additions & 5 deletions
10
...icnic/errorprone/documentation/bugpattern-test-documentation-replacement-two-sources.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
{ | ||
"name": "IdentityConversion", | ||
"name": "TestChecker", | ||
"identificationTests": [], | ||
"replacementTests": [ | ||
{ | ||
"inputLines": "public final class B {}\n", | ||
"outputLines": "public final class B {}\n" | ||
"inputLines": "class B {}\n", | ||
"outputLines": "class B {}\n" | ||
}, | ||
{ | ||
"inputLines": "public final class A {}\n", | ||
"outputLines": "public final class A {}\n" | ||
"inputLines": "class A {}\n", | ||
"outputLines": "class A {}\n" | ||
} | ||
] | ||
} |
6 changes: 3 additions & 3 deletions
6
...urces/tech/picnic/errorprone/documentation/bugpattern-test-documentation-replacement.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
{ | ||
"name": "IdentityConversion", | ||
"name": "TestChecker", | ||
"identificationTests": [], | ||
"replacementTests": [ | ||
{ | ||
"inputLines": "import com.google.common.collect.ImmutableSet;\n\npublic final class A {\n public void m() {\n ImmutableSet<Object> set = ImmutableSet.copyOf(ImmutableSet.of());\n }\n}\n", | ||
"outputLines": "import com.google.common.collect.ImmutableSet;\n\npublic final class A {\n public void m() {\n ImmutableSet<Object> set = ImmutableSet.of();\n }\n}\n" | ||
"inputLines": "class A {}\n", | ||
"outputLines": "class A {}\n" | ||
} | ||
] | ||
} |