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

Unified Diff: test/kernel/kernel_test.dart

Issue 2194163002: Change default binary file extension to .dill (Closed) Base URL: git@github.com:dart-lang/rasta.git@private_names
Patch Set: Use constants for file extensions. Created 4 years, 4 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 | « submodules.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/kernel/kernel_test.dart
diff --git a/test/kernel/kernel_test.dart b/test/kernel/kernel_test.dart
index 19a24867867403d06f891aa92f8e8a6b1979517f..128882381602183b6c15bdcfe603997b1ecf89cf 100644
--- a/test/kernel/kernel_test.dart
+++ b/test/kernel/kernel_test.dart
@@ -47,11 +47,16 @@ import 'package:rasta/src/options.dart' show
const bool generateExpectations =
const bool.fromEnvironment("generateExpectations");
+const String dartExtension = ".dart";
+const String kernelExtension = ".dill";
+
Future<Null> addRegressions(Map<Uri, Uri> tests, Uri temp) async {
Stream<TestDescription> regressions = listTests(
- <Uri>[Uri.base.resolve("test/kernel/regression/")], pattern: ".dart");
+ <Uri>[Uri.base.resolve("test/kernel/regression/")],
+ pattern: dartExtension);
await for (TestDescription regression in regressions) {
- tests[regression.uri] = temp.resolve("${regression.shortName}.bart");
+ tests[regression.uri] =
+ temp.resolve("${regression.shortName}$kernelExtension");
}
}
@@ -69,10 +74,10 @@ Future<Null> runTests(Rastask task) async {
// directory.
Uri temp = Platform.script;
Map<Uri, Uri> tests = <Uri, Uri>{
- Uri.parse("dart:core"): temp.resolve("core.bart"),
+ Uri.parse("dart:core"): temp.resolve("core$kernelExtension"),
- Uri.parse("package:compiler/src/dart2js.dart"):
- temp.resolve("dart2js.bart"),
+ Uri.parse("package:compiler/src/dart2js$dartExtension"):
+ temp.resolve("dart2js$kernelExtension"),
};
await addRegressions(tests, temp);
@@ -89,12 +94,12 @@ Future<Null> runTests(Rastask task) async {
bool isRegression = source.path.contains("/regression/");
print("Rastarizing $source");
- Uri bart = tests[source];
- File output = new File.fromUri(bart);
+ Uri dill = tests[source];
+ File output = new File.fromUri(dill);
await output.parent.create(recursive: true);
Options options = new Options(
- source, bart, dependenciesFile: null,
+ source, dill, dependenciesFile: null,
generateLibrary: isRegression ? isRegression : null,
isVerbose: true, isBatch: false, pattern: null);
@@ -115,7 +120,7 @@ Future<Null> runTests(Rastask task) async {
outcome = await checkAgainstExpectations(node);
}
if (outcome == Expectation.PASS) {
- outcome = checkRoundTrip(bart);
+ outcome = checkRoundTrip(dill);
}
Set<Expectation> expectedOutcomes = isRegression
« no previous file with comments | « submodules.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698