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

Unified Diff: tests/compiler/dart2js/serialization/analysis_test.dart

Issue 2004833003: Support multiple resolution inputs from command line. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Fix after rebase Created 4 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
Index: tests/compiler/dart2js/serialization/analysis_test.dart
diff --git a/tests/compiler/dart2js/serialization/analysis_test.dart b/tests/compiler/dart2js/serialization/analysis_test.dart
index 30fb59b87b46af2bf26718adac3f84d986abd9a0..42c1f5fc6c40de64c3e74ae7faf3182951413f4e 100644
--- a/tests/compiler/dart2js/serialization/analysis_test.dart
+++ b/tests/compiler/dart2js/serialization/analysis_test.dart
@@ -17,7 +17,8 @@ import 'test_data.dart';
main(List<String> args) {
asyncTest(() async {
Arguments arguments = new Arguments.from(args);
- String serializedData = await serializeDartCore(arguments: arguments);
+ SerializedData serializedData =
+ await serializeDartCore(arguments: arguments);
if (arguments.filename != null) {
Uri entryPoint = Uri.base.resolve(nativeToUriPath(arguments.filename));
await analyze(serializedData, entryPoint, null);
@@ -30,7 +31,7 @@ main(List<String> args) {
});
}
-Future analyze(String serializedData, Uri entryPoint, Test test,
+Future analyze(SerializedData serializedData, Uri entryPoint, Test test,
{int index}) async {
String testDescription =
test != null ? test.sourceFiles[entryPoint.path] : '${entryPoint}';
@@ -40,12 +41,11 @@ Future analyze(String serializedData, Uri entryPoint, Test test,
DiagnosticCollector diagnosticCollector = new DiagnosticCollector();
await runCompiler(
entryPoint: entryPoint,
- memorySourceFiles: test != null ? test.sourceFiles : const {},
+ resolutionInputs: serializedData.toUris(),
+ memorySourceFiles: serializedData.toMemorySourceFiles(
+ test != null ? test.sourceFiles : null),
options: [Flags.analyzeOnly],
- diagnosticHandler: diagnosticCollector,
- beforeRun: (Compiler compiler) {
- compiler.serialization.deserializeFromText(serializedData);
- });
+ diagnosticHandler: diagnosticCollector);
if (test != null) {
Expect.equals(test.expectedErrorCount, diagnosticCollector.errors.length,
"Unexpected error count.");
« no previous file with comments | « tests/compiler/dart2js/mirrors_used_test.dart ('k') | tests/compiler/dart2js/serialization/compilation_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698