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 | 7 |
8 import 'dart:async'; | 8 import 'dart:async'; |
9 import 'dart:io' show Platform; | 9 import 'dart:io' show Platform; |
10 | 10 |
11 import 'package:async_helper/async_helper.dart'; | 11 import 'package:async_helper/async_helper.dart'; |
12 import 'package:expect/expect.dart'; | 12 import 'package:expect/expect.dart'; |
13 | 13 |
14 import 'package:compiler/compiler.dart' as api; | 14 import 'package:compiler/compiler.dart' as api; |
| 15 import 'package:compiler/src/compile_time_constants.dart'; |
15 import 'package:compiler/src/dart2js.dart' as entry; | 16 import 'package:compiler/src/dart2js.dart' as entry; |
16 import 'package:compiler/src/dart2jslib.dart'; | 17 import 'package:compiler/src/dart2jslib.dart'; |
17 import 'package:compiler/src/apiimpl.dart' as apiimpl; | 18 import 'package:compiler/src/apiimpl.dart' as apiimpl; |
18 import 'package:compiler/src/elements/elements.dart'; | 19 import 'package:compiler/src/elements/elements.dart'; |
19 import 'package:compiler/src/library_loader.dart'; | 20 import 'package:compiler/src/library_loader.dart'; |
20 import 'package:compiler/src/resolution/resolution.dart'; | 21 import 'package:compiler/src/resolution/resolution.dart'; |
21 import 'package:compiler/src/scanner/scannerlib.dart'; | 22 import 'package:compiler/src/scanner/scannerlib.dart'; |
22 import 'package:compiler/src/util/util.dart'; | 23 import 'package:compiler/src/util/util.dart'; |
23 | 24 |
24 class TestCompiler extends apiimpl.Compiler { | 25 class TestCompiler extends apiimpl.Compiler { |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 | 263 |
263 expected = _expectedExitCode( | 264 expected = _expectedExitCode( |
264 beforeRun: tests[marker], fatalWarnings: true); | 265 beforeRun: tests[marker], fatalWarnings: true); |
265 totalExpectedErrors += expected.length; | 266 totalExpectedErrors += expected.length; |
266 await testExitCodes(marker, expected, ['--fatal-warnings']); | 267 await testExitCodes(marker, expected, ['--fatal-warnings']); |
267 } | 268 } |
268 | 269 |
269 Expect.equals(totalExpectedErrors, checkedResults); | 270 Expect.equals(totalExpectedErrors, checkedResults); |
270 }); | 271 }); |
271 } | 272 } |
OLD | NEW |