| Index: pkg/front_end/lib/src/fasta/testing/suite.dart
|
| diff --git a/pkg/front_end/lib/src/fasta/testing/suite.dart b/pkg/front_end/lib/src/fasta/testing/suite.dart
|
| index 1a42e1d8646e61ea14297885b45222d37a964ee8..28535e686f047da504346745cb893ef95c94a5a8 100644
|
| --- a/pkg/front_end/lib/src/fasta/testing/suite.dart
|
| +++ b/pkg/front_end/lib/src/fasta/testing/suite.dart
|
| @@ -10,6 +10,9 @@ import 'dart:convert' show JSON;
|
|
|
| import 'package:analyzer/src/generated/sdk.dart' show DartSdk;
|
|
|
| +import 'package:front_end/src/fasta/testing/validating_instrumentation.dart'
|
| + show ValidatingInstrumentation;
|
| +
|
| import 'package:kernel/ast.dart' show Library, Program;
|
|
|
| import 'package:analyzer/src/kernel/loader.dart' show DartLoader;
|
| @@ -161,7 +164,10 @@ class Outline extends Step<TestDescription, Program, FastaContext> {
|
|
|
| final bool strongMode;
|
|
|
| - const Outline(this.fullCompile, this.astKind, this.strongMode);
|
| + const Outline(this.fullCompile, this.astKind, this.strongMode,
|
| + {this.updateExpectations: false});
|
| +
|
| + final bool updateExpectations;
|
|
|
| String get name {
|
| return fullCompile ? "${astKind} compile" : "outline";
|
| @@ -185,9 +191,20 @@ class Outline extends Step<TestDescription, Program, FastaContext> {
|
| try {
|
| sourceTarget.read(description.uri);
|
| await dillTarget.writeOutline(null);
|
| + var instrumentation = new ValidatingInstrumentation();
|
| + await instrumentation.loadExpectations(description.uri);
|
| + sourceTarget.loader.instrumentation = instrumentation;
|
| p = await sourceTarget.writeOutline(null);
|
| if (fullCompile) {
|
| p = await sourceTarget.writeProgram(null);
|
| + instrumentation.finish();
|
| + if (instrumentation.hasProblems) {
|
| + if (updateExpectations) {
|
| + await instrumentation.fixSource(description.uri);
|
| + } else {
|
| + return fail(null, instrumentation.problemsAsString);
|
| + }
|
| + }
|
| }
|
| } on InputError catch (e, s) {
|
| return fail(null, e.error, s);
|
|
|