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 'serialization_helper.dart'; |
17 | 17 |
18 const List<Test> TESTS = const <Test>[ | 18 const List<Test> TESTS = const <Test>[ |
19 const Test(const { | 19 const Test(const { |
| 20 'main.dart': 'main() {}' |
| 21 }), |
| 22 |
| 23 const Test(const { |
20 'main.dart': 'main() => print("Hello World");' | 24 'main.dart': 'main() => print("Hello World");' |
21 }), | 25 }), |
22 | 26 |
23 const Test(const { | 27 const Test(const { |
24 'main.dart': 'main() => print("Hello World", 0);' | 28 'main.dart': 'main() => print("Hello World", 0);' |
25 }, | 29 }, |
26 expectedWarningCount: 1, | 30 expectedWarningCount: 1, |
27 expectedInfoCount: 1), | 31 expectedInfoCount: 1), |
28 | 32 |
29 const Test(const { | 33 const Test(const { |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 test.expectedWarningCount, | 248 test.expectedWarningCount, |
245 diagnosticCollector.warnings.length, | 249 diagnosticCollector.warnings.length, |
246 "Unexpected warning count."); | 250 "Unexpected warning count."); |
247 Expect.equals(test.expectedHintCount, diagnosticCollector.hints.length, | 251 Expect.equals(test.expectedHintCount, diagnosticCollector.hints.length, |
248 "Unexpected hint count."); | 252 "Unexpected hint count."); |
249 Expect.equals(test.expectedInfoCount, diagnosticCollector.infos.length, | 253 Expect.equals(test.expectedInfoCount, diagnosticCollector.infos.length, |
250 "Unexpected info count."); | 254 "Unexpected info count."); |
251 } | 255 } |
252 } | 256 } |
253 | 257 |
OLD | NEW |