| 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_analysis_test; | 5 library dart2js.serialization_analysis_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:expect/expect.dart'; | 9 import 'package:expect/expect.dart'; |
| 10 import 'package:compiler/src/commandline_options.dart'; | 10 import 'package:compiler/src/commandline_options.dart'; |
| 11 import 'package:compiler/src/common/backend_api.dart'; | 11 import 'package:compiler/src/common/backend_api.dart'; |
| 12 import 'package:compiler/src/common/names.dart'; | 12 import 'package:compiler/src/common/names.dart'; |
| 13 import 'package:compiler/src/compiler.dart'; | 13 import 'package:compiler/src/compiler.dart'; |
| 14 import 'package:compiler/src/filenames.dart'; | 14 import 'package:compiler/src/filenames.dart'; |
| 15 import 'memory_compiler.dart'; | 15 import '../memory_compiler.dart'; |
| 16 import 'serialization_helper.dart'; | 16 import 'helper.dart'; |
| 17 import 'serialization_test_data.dart'; | 17 import 'test_data.dart'; |
| 18 | 18 |
| 19 main(List<String> arguments) { | 19 main(List<String> arguments) { |
| 20 asyncTest(() async { | 20 asyncTest(() async { |
| 21 String serializedData = await serializeDartCore(); | 21 String serializedData = await serializeDartCore(); |
| 22 | 22 |
| 23 if (arguments.isNotEmpty) { | 23 if (arguments.isNotEmpty) { |
| 24 Uri entryPoint = Uri.base.resolve(nativeToUriPath(arguments.last)); | 24 Uri entryPoint = Uri.base.resolve(nativeToUriPath(arguments.last)); |
| 25 await analyze(serializedData, entryPoint, null); | 25 await analyze(serializedData, entryPoint, null); |
| 26 } else { | 26 } else { |
| 27 Uri entryPoint = Uri.parse('memory:main.dart'); | 27 Uri entryPoint = Uri.parse('memory:main.dart'); |
| (...skipping 21 matching lines...) Expand all Loading... |
| 49 test.expectedWarningCount, | 49 test.expectedWarningCount, |
| 50 diagnosticCollector.warnings.length, | 50 diagnosticCollector.warnings.length, |
| 51 "Unexpected warning count."); | 51 "Unexpected warning count."); |
| 52 Expect.equals(test.expectedHintCount, diagnosticCollector.hints.length, | 52 Expect.equals(test.expectedHintCount, diagnosticCollector.hints.length, |
| 53 "Unexpected hint count."); | 53 "Unexpected hint count."); |
| 54 Expect.equals(test.expectedInfoCount, diagnosticCollector.infos.length, | 54 Expect.equals(test.expectedInfoCount, diagnosticCollector.infos.length, |
| 55 "Unexpected info count."); | 55 "Unexpected info count."); |
| 56 } | 56 } |
| 57 } | 57 } |
| 58 | 58 |
| OLD | NEW |