| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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_resolved_ast_test; | 5 library dart2js.serialization_resolved_ast_test; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'package:async_helper/async_helper.dart'; | 8 import 'package:async_helper/async_helper.dart'; |
| 9 import 'package:compiler/src/commandline_options.dart'; | 9 import 'package:compiler/src/commandline_options.dart'; |
| 10 import 'package:compiler/src/compiler.dart'; | 10 import 'package:compiler/src/compiler.dart'; |
| 11 import 'package:compiler/src/elements/elements.dart'; | |
| 12 import 'package:compiler/src/filenames.dart'; | 11 import 'package:compiler/src/filenames.dart'; |
| 13 import 'package:compiler/src/serialization/equivalence.dart'; | 12 import '../equivalence/check_functions.dart'; |
| 14 import '../memory_compiler.dart'; | 13 import '../memory_compiler.dart'; |
| 15 import 'helper.dart'; | 14 import 'helper.dart'; |
| 16 import 'test_data.dart'; | 15 import 'test_data.dart'; |
| 17 import 'test_helper.dart'; | |
| 18 | 16 |
| 19 main(List<String> args) { | 17 main(List<String> args) { |
| 20 Arguments arguments = new Arguments.from(args); | 18 Arguments arguments = new Arguments.from(args); |
| 21 asyncTest(() async { | 19 asyncTest(() async { |
| 22 SerializedData serializedData = | 20 SerializedData serializedData = |
| 23 await serializeDartCore(arguments: arguments); | 21 await serializeDartCore(arguments: arguments); |
| 24 if (arguments.filename != null) { | 22 if (arguments.filename != null) { |
| 25 Uri entryPoint = Uri.base.resolve(nativeToUriPath(arguments.filename)); | 23 Uri entryPoint = Uri.base.resolve(nativeToUriPath(arguments.filename)); |
| 26 await check(serializedData, entryPoint); | 24 await check(serializedData, entryPoint); |
| 27 } else { | 25 } else { |
| (...skipping 15 matching lines...) Expand all Loading... |
| 43 | 41 |
| 44 Compiler compilerDeserialized = compilerFor( | 42 Compiler compilerDeserialized = compilerFor( |
| 45 memorySourceFiles: serializedData.toMemorySourceFiles(sourceFiles), | 43 memorySourceFiles: serializedData.toMemorySourceFiles(sourceFiles), |
| 46 resolutionInputs: serializedData.toUris(), | 44 resolutionInputs: serializedData.toUris(), |
| 47 options: [Flags.analyzeAll]); | 45 options: [Flags.analyzeAll]); |
| 48 compilerDeserialized.resolution.retainCachesForTesting = true; | 46 compilerDeserialized.resolution.retainCachesForTesting = true; |
| 49 await compilerDeserialized.run(entryPoint); | 47 await compilerDeserialized.run(entryPoint); |
| 50 | 48 |
| 51 checkAllResolvedAsts(compilerNormal, compilerDeserialized, verbose: true); | 49 checkAllResolvedAsts(compilerNormal, compilerDeserialized, verbose: true); |
| 52 } | 50 } |
| OLD | NEW |