Skip to content

Commit

Permalink
Automatic code cleanup.
Browse files Browse the repository at this point in the history
RELNOTES=no
PiperOrigin-RevId: 573317948
  • Loading branch information
cushon authored and Error Prone Team committed Oct 13, 2023
1 parent 53f24d4 commit e8298e4
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,13 @@ public void doTest() {

public void doTest(TestMode testMode) {
checkState(!run, "doTest should only be called once");

String depsForTestInputs = System.getProperty("com.google.errorprone.deps_for_test_inputs");
if (depsForTestInputs != null) {
options =
ImmutableList.<String>builder().addAll(options).add("-cp").add(depsForTestInputs).build();
}

this.run = true;
for (Map.Entry<JavaFileObject, JavaFileObject> entry : sources.entrySet()) {
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,17 @@ public CompilationTestHelper expectErrorMessage(String key, Predicate<? super St
public void doTest() {
checkState(!sources.isEmpty(), "No source files to compile");
checkState(!run, "doTest should only be called once");

String depsForTestInputs = System.getProperty("com.google.errorprone.deps_for_test_inputs");
if (depsForTestInputs != null) {
extraArgs =
ImmutableList.<String>builder()
.addAll(extraArgs)
.add("-cp")
.add(depsForTestInputs)
.build();
}

this.run = true;
Result result = compile();
for (Diagnostic<? extends JavaFileObject> diagnostic : diagnosticHelper.getDiagnostics()) {
Expand Down

0 comments on commit e8298e4

Please sign in to comment.