| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library dart2js.serialization_model_test; | 5 library dart2js.serialization_model_test; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:io'; | 8 import 'dart:io'; |
| 9 import 'package:async_helper/async_helper.dart'; | 9 import 'package:async_helper/async_helper.dart'; |
| 10 import 'package:expect/expect.dart'; | 10 import 'package:expect/expect.dart'; |
| 11 import 'package:compiler/src/commandline_options.dart'; | 11 import 'package:compiler/src/commandline_options.dart'; |
| 12 import 'package:compiler/src/common/backend_api.dart'; | 12 import 'package:compiler/src/common/backend_api.dart'; |
| 13 import 'package:compiler/src/common/names.dart'; | 13 import 'package:compiler/src/common/names.dart'; |
| 14 import 'package:compiler/src/common/resolution.dart'; | 14 import 'package:compiler/src/common/resolution.dart'; |
| 15 import 'package:compiler/src/compiler.dart'; | 15 import 'package:compiler/src/compiler.dart'; |
| 16 import 'package:compiler/src/dart_types.dart'; | 16 import 'package:compiler/src/dart_types.dart'; |
| 17 import 'package:compiler/src/elements/elements.dart'; | 17 import 'package:compiler/src/elements/elements.dart'; |
| 18 import 'package:compiler/src/filenames.dart'; | 18 import 'package:compiler/src/filenames.dart'; |
| 19 import 'package:compiler/src/serialization/element_serialization.dart'; | 19 import 'package:compiler/src/serialization/element_serialization.dart'; |
| 20 import 'package:compiler/src/serialization/impact_serialization.dart'; | 20 import 'package:compiler/src/serialization/impact_serialization.dart'; |
| 21 import 'package:compiler/src/serialization/json_serializer.dart'; | 21 import 'package:compiler/src/serialization/json_serializer.dart'; |
| 22 import 'package:compiler/src/serialization/serialization.dart'; | 22 import 'package:compiler/src/serialization/serialization.dart'; |
| 23 import 'package:compiler/src/serialization/equivalence.dart'; | 23 import 'package:compiler/src/serialization/equivalence.dart'; |
| 24 import 'package:compiler/src/serialization/task.dart'; | 24 import 'package:compiler/src/serialization/task.dart'; |
| 25 import 'package:compiler/src/universe/world_impact.dart'; | 25 import 'package:compiler/src/universe/world_impact.dart'; |
| 26 import 'package:compiler/src/universe/class_set.dart'; | 26 import 'package:compiler/src/universe/class_set.dart'; |
| 27 import 'package:compiler/src/universe/use.dart'; | 27 import 'package:compiler/src/universe/use.dart'; |
| 28 import 'memory_compiler.dart'; | 28 import '../memory_compiler.dart'; |
| 29 import 'serialization_helper.dart'; | 29 import 'helper.dart'; |
| 30 import 'serialization_test_data.dart'; | 30 import 'test_data.dart'; |
| 31 import 'serialization_test_helper.dart'; | 31 import 'test_helper.dart'; |
| 32 | 32 |
| 33 main(List<String> args) { | 33 main(List<String> args) { |
| 34 asyncTest(() async { | 34 asyncTest(() async { |
| 35 Arguments arguments = new Arguments.from(args); | 35 Arguments arguments = new Arguments.from(args); |
| 36 String serializedData = await serializeDartCore(arguments: arguments); | 36 String serializedData = await serializeDartCore(arguments: arguments); |
| 37 if (arguments.filename != null) { | 37 if (arguments.filename != null) { |
| 38 Uri entryPoint = Uri.base.resolve(nativeToUriPath(arguments.filename)); | 38 Uri entryPoint = Uri.base.resolve(nativeToUriPath(arguments.filename)); |
| 39 await check(serializedData, entryPoint); | 39 await check(serializedData, entryPoint); |
| 40 } else { | 40 } else { |
| 41 Uri entryPoint = Uri.parse('memory:main.dart'); | 41 Uri entryPoint = Uri.parse('memory:main.dart'); |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 | 185 |
| 186 if (failOnUnfound || remaining.isNotEmpty) { | 186 if (failOnUnfound || remaining.isNotEmpty) { |
| 187 Expect.fail(message); | 187 Expect.fail(message); |
| 188 } else { | 188 } else { |
| 189 print(message); | 189 print(message); |
| 190 } | 190 } |
| 191 } else if (verbose) { | 191 } else if (verbose) { |
| 192 print(message); | 192 print(message); |
| 193 } | 193 } |
| 194 } | 194 } |
| OLD | NEW |