OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 // Test the exit code of dart2js in case of exceptions, errors, warnings, etc. | 5 // Test the exit code of dart2js in case of exceptions, errors, warnings, etc. |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 import 'dart:io' show Platform; | 8 import 'dart:io' show Platform; |
9 | 9 |
10 import 'package:async_helper/async_helper.dart'; | 10 import 'package:async_helper/async_helper.dart'; |
11 import 'package:expect/expect.dart'; | 11 import 'package:expect/expect.dart'; |
12 | 12 |
13 import 'package:compiler/compiler_new.dart' as api; | 13 import 'package:compiler/compiler_new.dart' as api; |
14 import 'package:compiler/src/common/backend_api.dart'; | |
15 import 'package:compiler/src/common/codegen.dart'; | 14 import 'package:compiler/src/common/codegen.dart'; |
16 import 'package:compiler/src/common/resolution.dart'; | 15 import 'package:compiler/src/common/resolution.dart'; |
17 import 'package:compiler/src/compile_time_constants.dart'; | 16 import 'package:compiler/src/compile_time_constants.dart'; |
18 import 'package:compiler/src/compiler.dart'; | 17 import 'package:compiler/src/compiler.dart'; |
19 import 'package:compiler/src/dart2js.dart' as entry; | 18 import 'package:compiler/src/dart2js.dart' as entry; |
20 import 'package:compiler/src/diagnostics/diagnostic_listener.dart'; | 19 import 'package:compiler/src/diagnostics/diagnostic_listener.dart'; |
21 import 'package:compiler/src/diagnostics/invariant.dart'; | 20 import 'package:compiler/src/diagnostics/invariant.dart'; |
22 import 'package:compiler/src/diagnostics/messages.dart'; | 21 import 'package:compiler/src/diagnostics/messages.dart'; |
23 import 'package:compiler/src/diagnostics/spannable.dart'; | 22 import 'package:compiler/src/diagnostics/spannable.dart'; |
24 import 'package:compiler/src/apiimpl.dart' as apiimpl; | 23 import 'package:compiler/src/apiimpl.dart' as apiimpl; |
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
308 | 307 |
309 expected = | 308 expected = |
310 _expectedExitCode(beforeRun: tests[marker], fatalWarnings: true); | 309 _expectedExitCode(beforeRun: tests[marker], fatalWarnings: true); |
311 totalExpectedErrors += expected.length; | 310 totalExpectedErrors += expected.length; |
312 await testExitCodes(marker, expected, ['--fatal-warnings']); | 311 await testExitCodes(marker, expected, ['--fatal-warnings']); |
313 } | 312 } |
314 | 313 |
315 Expect.equals(totalExpectedErrors, checkedResults); | 314 Expect.equals(totalExpectedErrors, checkedResults); |
316 }); | 315 }); |
317 } | 316 } |
OLD | NEW |