File tree Expand file tree Collapse file tree
javatests/io/bazel/rules/closure/worker/testing Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2121import com .google .common .truth .FailureMetadata ;
2222import com .google .common .truth .Subject ;
2323import com .google .common .truth .Truth ;
24- import java .util .Arrays ;
2524import java .util .Set ;
2625
2726/** Result of program invocation. */
@@ -37,6 +36,10 @@ public abstract class ProgramResult {
3736 /** Returns {@code true} if program invocation failed. */
3837 public abstract boolean failed ();
3938
39+ static ProgramResult create (Set <String > errors , Set <String > warnings , boolean failed ) {
40+ return new AutoValue_ProgramResult (errors , warnings , failed );
41+ }
42+
4043 /** Begins a Truth assertion about a program invocation result. */
4144 public static ResultChain assertThat (ProgramResult result ) {
4245 return Truth .assertAbout (SUBJECT_FACTORY ).that (result );
Original file line number Diff line number Diff line change @@ -37,6 +37,6 @@ public final class ProgramRunner<T extends Program> {
3737 /** Runs program and returns result of invocation. */
3838 public ProgramResult run () throws Exception {
3939 delegate .run ();
40- return new AutoValue_ProgramResult (reporter .getErrors (), reporter .getWarnings (), failed .get ());
40+ return ProgramResult . create (reporter .getErrors (), reporter .getWarnings (), failed .get ());
4141 }
4242}
You can’t perform that action at this time.
0 commit comments