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

Unified Diff: pkg/front_end/lib/src/fasta/testing/suite.dart

Issue 2825063002: Move kernel baseline tests to front_end. (Closed)
Patch Set: Created 3 years, 8 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 | « pkg/front_end/lib/src/fasta/testing/kernel_chain.dart ('k') | pkg/front_end/lib/src/fasta/vm.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 040ee5e99e6310f35f4438ef9ce1192201d0f3ce..1a42e1d8646e61ea14297885b45222d37a964ee8 100644
--- a/pkg/front_end/lib/src/fasta/testing/suite.dart
+++ b/pkg/front_end/lib/src/fasta/testing/suite.dart
@@ -34,7 +34,7 @@ import '../kernel/kernel_target.dart' show KernelTarget;
import '../dill/dill_target.dart' show DillTarget;
-export 'kernel_chain.dart' show TestContext;
+export 'kernel_chain.dart' show STRONG_MODE, TestContext;
export 'package:testing/testing.dart' show Chain, runMe;
@@ -51,12 +51,12 @@ const String EXPECTATIONS = '''
]
''';
-String shortenAstKindName(AstKind astKind) {
+String shortenAstKindName(AstKind astKind, bool strongMode) {
switch (astKind) {
case AstKind.Analyzer:
- return "dartk";
+ return strongMode ? "dartk-strong" : "dartk";
case AstKind.Kernel:
- return "direct";
+ return strongMode ? "strong" : "direct";
}
throw "Unknown AST kind: $astKind";
}
@@ -87,12 +87,12 @@ class FastaContext extends TestContext {
bool fullCompile,
AstKind astKind)
: steps = <Step>[
- new Outline(fullCompile, astKind),
+ new Outline(fullCompile, astKind, strongMode),
const Print(),
new Verify(fullCompile),
new MatchExpectation(
fullCompile
- ? ".${shortenAstKindName(astKind)}.expect"
+ ? ".${shortenAstKindName(astKind, strongMode)}.expect"
: ".outline.expect",
updateExpectations: updateExpectations)
],
@@ -159,7 +159,9 @@ class Outline extends Step<TestDescription, Program, FastaContext> {
final AstKind astKind;
- const Outline(this.fullCompile, this.astKind);
+ final bool strongMode;
+
+ const Outline(this.fullCompile, this.astKind, this.strongMode);
String get name {
return fullCompile ? "${astKind} compile" : "outline";
@@ -176,8 +178,8 @@ class Outline extends Step<TestDescription, Program, FastaContext> {
..input = Uri.parse("org.dartlang:platform") // Make up a name.
..setProgram(platform);
KernelTarget sourceTarget = astKind == AstKind.Analyzer
- ? new AnalyzerTarget(dillTarget, context.uriTranslator)
- : new KernelTarget(dillTarget, context.uriTranslator);
+ ? new AnalyzerTarget(dillTarget, context.uriTranslator, strongMode)
+ : new KernelTarget(dillTarget, context.uriTranslator, strongMode);
Program p;
try {
« no previous file with comments | « pkg/front_end/lib/src/fasta/testing/kernel_chain.dart ('k') | pkg/front_end/lib/src/fasta/vm.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698