Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(477)

Unified Diff: pkg/front_end/test/fasta/testing/suite.dart

Issue 2863773004: Separate updateComments from updateExpectations. (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/front_end/test/fasta/testing/suite.dart
diff --git a/pkg/front_end/test/fasta/testing/suite.dart b/pkg/front_end/test/fasta/testing/suite.dart
index 4673227363e454df733e9aea679a6ea286da16ff..36287790344a80041b48e913c80671c15f318fac 100644
--- a/pkg/front_end/test/fasta/testing/suite.dart
+++ b/pkg/front_end/test/fasta/testing/suite.dart
@@ -87,11 +87,17 @@ class FastaContext extends ChainContext {
Future<Program> platform;
- FastaContext(this.vm, bool strongMode, bool updateExpectations,
- this.uriTranslator, bool fullCompile, AstKind astKind)
+ FastaContext(
+ this.vm,
+ bool strongMode,
+ bool updateExpectations,
+ bool updateComments,
+ this.uriTranslator,
+ bool fullCompile,
+ AstKind astKind)
: steps = <Step>[
new Outline(fullCompile, astKind, strongMode,
- updateExpectations: updateExpectations),
+ updateComments: updateComments),
const Print(),
new Verify(fullCompile),
new MatchExpectation(
@@ -121,11 +127,12 @@ class FastaContext extends ChainContext {
TranslateUri uriTranslator = await TranslateUri.parse(packages);
bool strongMode = environment.containsKey(STRONG_MODE);
bool updateExpectations = environment["updateExpectations"] == "true";
+ bool updateComments = environment["updateComments"] == "true";
String astKindString = environment[AST_KIND_INDEX];
AstKind astKind =
astKindString == null ? null : AstKind.values[int.parse(astKindString)];
- return new FastaContext(vm, strongMode, updateExpectations, uriTranslator,
- environment.containsKey(ENABLE_FULL_COMPILE), astKind);
+ return new FastaContext(vm, strongMode, updateExpectations, updateComments,
+ uriTranslator, environment.containsKey(ENABLE_FULL_COMPILE), astKind);
}
}
@@ -160,9 +167,9 @@ class Outline extends Step<TestDescription, Program, FastaContext> {
final bool strongMode;
const Outline(this.fullCompile, this.astKind, this.strongMode,
- {this.updateExpectations: false});
+ {this.updateComments: false});
- final bool updateExpectations;
+ final bool updateComments;
String get name {
return fullCompile ? "${astKind} compile" : "outline";
@@ -197,7 +204,7 @@ class Outline extends Step<TestDescription, Program, FastaContext> {
p = await sourceTarget.writeProgram(null);
instrumentation?.finish();
if (instrumentation != null && instrumentation.hasProblems) {
- if (updateExpectations) {
+ if (updateComments) {
await instrumentation.fixSource(description.uri);
} else {
return fail(null, instrumentation.problemsAsString);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698