Skip to content

Commit

Permalink
Instead of calling Subject.actual(), store the actual value in a fiel…
Browse files Browse the repository at this point in the history
…d, and read that.

actual() is being removed.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=246997654
  • Loading branch information
cpovirk authored and ronshapiro committed May 8, 2019
1 parent 4eeb8c0 commit 9f36c57
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,11 @@
import javax.tools.JavaFileObject;

final class MemoizedMethodSubject extends Subject<MemoizedMethodSubject, String> {
private final String actual;

MemoizedMethodSubject(FailureMetadata failureMetadata, String subject) {
super(failureMetadata, subject);
MemoizedMethodSubject(FailureMetadata failureMetadata, String actual) {
super(failureMetadata, actual);
this.actual = actual;
}

void hasError(String error) {
Expand All @@ -42,7 +44,7 @@ void hasError(String error) {
"",
"@AutoValue abstract class Value {",
" abstract String string();",
getSubject(),
actual,
"}");
assertAbout(javaSource())
.that(file)
Expand Down

0 comments on commit 9f36c57

Please sign in to comment.