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

Unified Diff: tests/compiler/dart2js/serialization/model_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/model_test.dart
diff --git a/tests/compiler/dart2js/serialization/model_test.dart b/tests/compiler/dart2js/serialization/model_test.dart
index a8704ae3f80acd297067125cdbeddf7c2aa7db19..2ab28e9eee59521b15d555c95d41a69199162c78 100644
--- a/tests/compiler/dart2js/serialization/model_test.dart
+++ b/tests/compiler/dart2js/serialization/model_test.dart
@@ -24,7 +24,8 @@ import 'test_helper.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 checkModels(serializedData, entryPoint);
@@ -36,7 +37,7 @@ main(List<String> args) {
await checkModels(
serializedData,
entryPoint,
- sourceFiles: test.sourceFiles,
+ memorySourceFiles: test.sourceFiles,
verbose: arguments.verbose);
});
}
@@ -44,16 +45,16 @@ main(List<String> args) {
}
Future checkModels(
- String serializedData,
- Uri entryPoint,
- {Map<String, String> sourceFiles: const <String, String>{},
+ SerializedData serializedData,
+ Uri entryPoint,
+ {Map<String, String> memorySourceFiles: const <String, String>{},
bool verbose: false}) async {
print('------------------------------------------------------------------');
print('compile normal');
print('------------------------------------------------------------------');
Compiler compilerNormal = compilerFor(
- memorySourceFiles: sourceFiles,
+ memorySourceFiles: memorySourceFiles,
options: [Flags.analyzeOnly]);
compilerNormal.resolution.retainCachesForTesting = true;
await compilerNormal.run(entryPoint);
@@ -65,10 +66,10 @@ Future checkModels(
print('compile deserialized');
print('------------------------------------------------------------------');
Compiler compilerDeserialized = compilerFor(
- memorySourceFiles: sourceFiles,
+ memorySourceFiles: serializedData.toMemorySourceFiles(memorySourceFiles),
+ resolutionInputs: serializedData.toUris(),
options: [Flags.analyzeOnly]);
compilerDeserialized.resolution.retainCachesForTesting = true;
- compilerDeserialized.serialization.deserializeFromText(serializedData);
await compilerDeserialized.run(entryPoint);
compilerDeserialized.phase = Compiler.PHASE_DONE_RESOLVING;
compilerDeserialized.world.populate();
« no previous file with comments | « tests/compiler/dart2js/serialization/library_test.dart ('k') | tests/compiler/dart2js/serialization/resolved_ast_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698