Skip to content

Commit e8298e4

Browse files
cushonError Prone Team
authored and
Error Prone Team
committed
Automatic code cleanup.
RELNOTES=no PiperOrigin-RevId: 573317948
1 parent 53f24d4 commit e8298e4

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

test_helpers/src/main/java/com/google/errorprone/BugCheckerRefactoringTestHelper.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,13 @@ public void doTest() {
244244

245245
public void doTest(TestMode testMode) {
246246
checkState(!run, "doTest should only be called once");
247+
248+
String depsForTestInputs = System.getProperty("com.google.errorprone.deps_for_test_inputs");
249+
if (depsForTestInputs != null) {
250+
options =
251+
ImmutableList.<String>builder().addAll(options).add("-cp").add(depsForTestInputs).build();
252+
}
253+
247254
this.run = true;
248255
for (Map.Entry<JavaFileObject, JavaFileObject> entry : sources.entrySet()) {
249256
try {

test_helpers/src/main/java/com/google/errorprone/CompilationTestHelper.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,17 @@ public CompilationTestHelper expectErrorMessage(String key, Predicate<? super St
306306
public void doTest() {
307307
checkState(!sources.isEmpty(), "No source files to compile");
308308
checkState(!run, "doTest should only be called once");
309+
310+
String depsForTestInputs = System.getProperty("com.google.errorprone.deps_for_test_inputs");
311+
if (depsForTestInputs != null) {
312+
extraArgs =
313+
ImmutableList.<String>builder()
314+
.addAll(extraArgs)
315+
.add("-cp")
316+
.add(depsForTestInputs)
317+
.build();
318+
}
319+
309320
this.run = true;
310321
Result result = compile();
311322
for (Diagnostic<? extends JavaFileObject> diagnostic : diagnosticHelper.getDiagnostics()) {

0 commit comments

Comments
 (0)