[cfe] Show regeneration command on unittest expectation failures

Closes #43633

Change-Id: I57f39367c5bf0827a2f0cb62e2e796692e152949
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165660
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
This commit is contained in:
Johnni Winther
2020-10-02 09:52:17 +00:00
committed by commit-bot@chromium.org
parent fc7de901ee
commit d34287af1b
7 changed files with 64 additions and 17 deletions
+6 -1
View File
@@ -354,7 +354,12 @@ class Result<O> {
final List<String> logs = <String>[];
Result(this.output, this.outcome, this.error, this.trace);
/// If set, running the test with '-D$autoFixCommand' will automatically
/// update the test to match new expectations.
final String autoFixCommand;
Result(this.output, this.outcome, this.error, this.trace,
{this.autoFixCommand});
Result.pass(O output) : this(output, Expectation.Pass, null, null);