mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 03:36:59 +00:00
Rename FeContext to FastaContext.
R=paulberry@google.com Review-Url: https://codereview.chromium.org/2726843003 .
This commit is contained in:
parent
c59ecd801c
commit
369c94815d
|
@ -63,7 +63,7 @@ String shortenAstKindName(AstKind astKind) {
|
|||
throw "Unknown AST kind: $astKind";
|
||||
}
|
||||
|
||||
class FeContext extends TestContext {
|
||||
class FastaContext extends TestContext {
|
||||
final TranslateUri uriTranslator;
|
||||
|
||||
final List<Step> steps;
|
||||
|
@ -73,7 +73,7 @@ class FeContext extends TestContext {
|
|||
|
||||
Future<Program> platform;
|
||||
|
||||
FeContext(
|
||||
FastaContext(
|
||||
Uri sdk,
|
||||
Uri vm,
|
||||
Uri packages,
|
||||
|
@ -122,33 +122,36 @@ class FeContext extends TestContext {
|
|||
});
|
||||
}
|
||||
|
||||
static Future<FeContext> create(
|
||||
Chain suite,
|
||||
Map<String, String> environment,
|
||||
Uri sdk,
|
||||
Uri vm,
|
||||
Uri packages,
|
||||
bool strongMode,
|
||||
DartSdk dartSdk,
|
||||
bool updateExpectations) async {
|
||||
TranslateUri uriTranslator = await TranslateUri.parse(packages);
|
||||
String astKindString = environment[AST_KIND_INDEX];
|
||||
AstKind astKind =
|
||||
astKindString == null ? null : AstKind.values[int.parse(astKindString)];
|
||||
return new FeContext(
|
||||
sdk,
|
||||
vm,
|
||||
packages,
|
||||
strongMode,
|
||||
dartSdk,
|
||||
updateExpectations,
|
||||
uriTranslator,
|
||||
environment.containsKey(ENABLE_FULL_COMPILE),
|
||||
astKind);
|
||||
static Future<FastaContext> create(
|
||||
Chain suite, Map<String, String> environment) async {
|
||||
return TestContext.create(suite, environment, (Chain suite,
|
||||
Map<String, String> environment,
|
||||
Uri sdk,
|
||||
Uri vm,
|
||||
Uri packages,
|
||||
bool strongMode,
|
||||
DartSdk dartSdk,
|
||||
bool updateExpectations) async {
|
||||
TranslateUri uriTranslator = await TranslateUri.parse(packages);
|
||||
String astKindString = environment[AST_KIND_INDEX];
|
||||
AstKind astKind = astKindString == null
|
||||
? null
|
||||
: AstKind.values[int.parse(astKindString)];
|
||||
return new FastaContext(
|
||||
sdk,
|
||||
vm,
|
||||
packages,
|
||||
strongMode,
|
||||
dartSdk,
|
||||
updateExpectations,
|
||||
uriTranslator,
|
||||
environment.containsKey(ENABLE_FULL_COMPILE),
|
||||
astKind);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
class Outline extends Step<TestDescription, Program, FeContext> {
|
||||
class Outline extends Step<TestDescription, Program, FastaContext> {
|
||||
final bool fullCompile;
|
||||
|
||||
final AstKind astKind;
|
||||
|
@ -162,7 +165,7 @@ class Outline extends Step<TestDescription, Program, FeContext> {
|
|||
bool get isCompiler => fullCompile;
|
||||
|
||||
Future<Result<Program>> run(
|
||||
TestDescription description, FeContext context) async {
|
||||
TestDescription description, FastaContext context) async {
|
||||
Program platform = await context.createPlatform();
|
||||
Ticker ticker = new Ticker();
|
||||
DillTarget dillTarget = new DillTarget(ticker, context.uriTranslator);
|
||||
|
|
|
@ -4,16 +4,15 @@
|
|||
|
||||
library fasta.test.compile_test;
|
||||
|
||||
import 'dart:async' show
|
||||
Future;
|
||||
import 'dart:async' show Future;
|
||||
|
||||
import 'package:front_end/src/fasta/testing/suite.dart';
|
||||
|
||||
Future<FeContext> createContext(
|
||||
Future<FastaContext> createContext(
|
||||
Chain suite, Map<String, String> environment) {
|
||||
environment[ENABLE_FULL_COMPILE] = "";
|
||||
environment[AST_KIND_INDEX] = "${AstKind.Kernel.index}";
|
||||
return TestContext.create(suite, environment, FeContext.create);
|
||||
return FastaContext.create(suite, environment);
|
||||
}
|
||||
|
||||
main(List<String> arguments) => runMe(arguments, createContext, "testing.json");
|
||||
|
|
|
@ -4,16 +4,15 @@
|
|||
|
||||
library fasta.test.compile_test;
|
||||
|
||||
import 'dart:async' show
|
||||
Future;
|
||||
import 'dart:async' show Future;
|
||||
|
||||
import 'package:front_end/src/fasta/testing/suite.dart';
|
||||
|
||||
Future<FeContext> createContext(
|
||||
Future<FastaContext> createContext(
|
||||
Chain suite, Map<String, String> environment) {
|
||||
environment[ENABLE_FULL_COMPILE] = "";
|
||||
environment[AST_KIND_INDEX] = "${AstKind.Analyzer.index}";
|
||||
return TestContext.create(suite, environment, FeContext.create);
|
||||
return FastaContext.create(suite, environment);
|
||||
}
|
||||
|
||||
main(List<String> arguments) => runMe(arguments, createContext, "testing.json");
|
||||
|
|
|
@ -4,14 +4,13 @@
|
|||
|
||||
library fasta.test.outline_test;
|
||||
|
||||
import 'dart:async' show
|
||||
Future;
|
||||
import 'dart:async' show Future;
|
||||
|
||||
import 'package:front_end/src/fasta/testing/suite.dart';
|
||||
|
||||
Future<FeContext> createContext(
|
||||
Future<FastaContext> createContext(
|
||||
Chain suite, Map<String, String> environment) {
|
||||
return TestContext.create(suite, environment, FeContext.create);
|
||||
return FastaContext.create(suite, environment);
|
||||
}
|
||||
|
||||
main(List<String> arguments) => runMe(arguments, createContext, "testing.json");
|
||||
|
|
|
@ -4,20 +4,18 @@
|
|||
|
||||
library fasta.test.compile_test;
|
||||
|
||||
import 'dart:async' show
|
||||
Future;
|
||||
import 'dart:async' show Future;
|
||||
|
||||
import 'package:front_end/src/fasta/testing/suite.dart';
|
||||
|
||||
import 'package:front_end/src/fasta/testing/kernel_chain.dart' show
|
||||
MatchExpectation;
|
||||
import 'package:front_end/src/fasta/testing/kernel_chain.dart'
|
||||
show MatchExpectation;
|
||||
|
||||
Future<FeContext> createContext(
|
||||
Future<FastaContext> createContext(
|
||||
Chain suite, Map<String, String> environment) async {
|
||||
environment[ENABLE_FULL_COMPILE] = "";
|
||||
environment[AST_KIND_INDEX] = "${AstKind.Kernel.index}";
|
||||
FeContext context =
|
||||
await TestContext.create(suite, environment, FeContext.create);
|
||||
FastaContext context = await FastaContext.create(suite, environment);
|
||||
int index;
|
||||
for (int i = 0; i < context.steps.length; i++) {
|
||||
if (context.steps[i] is MatchExpectation) {
|
||||
|
|
Loading…
Reference in a new issue