| 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'; |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 String this.testType, | 47 String this.testType, |
| 48 Function this.onTest) | 48 Function this.onTest) |
| 49 : reporter = new TestDiagnosticReporter(), | 49 : reporter = new TestDiagnosticReporter(), |
| 50 super(inputProvider, outputProvider, handler, options) { | 50 super(inputProvider, outputProvider, handler, options) { |
| 51 reporter.compiler = this; | 51 reporter.compiler = this; |
| 52 reporter.reporter = super.reporter; | 52 reporter.reporter = super.reporter; |
| 53 test('Compiler'); | 53 test('Compiler'); |
| 54 } | 54 } |
| 55 | 55 |
| 56 @override | 56 @override |
| 57 Backend createBackend() { | 57 JavaScriptBackend createBackend() { |
| 58 return new TestBackend(this); | 58 return new TestBackend(this); |
| 59 } | 59 } |
| 60 | 60 |
| 61 @override | 61 @override |
| 62 ScannerTask createScannerTask() => new TestScanner(this); | 62 ScannerTask createScannerTask() => new TestScanner(this); |
| 63 | 63 |
| 64 @override | 64 @override |
| 65 Resolution createResolution() => new TestResolution(this); | 65 Resolution createResolution() => new TestResolution(this); |
| 66 | 66 |
| 67 @override | 67 @override |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 311 | 311 |
| 312 expected = | 312 expected = |
| 313 _expectedExitCode(beforeRun: tests[marker], fatalWarnings: true); | 313 _expectedExitCode(beforeRun: tests[marker], fatalWarnings: true); |
| 314 totalExpectedErrors += expected.length; | 314 totalExpectedErrors += expected.length; |
| 315 await testExitCodes(marker, expected, ['--fatal-warnings']); | 315 await testExitCodes(marker, expected, ['--fatal-warnings']); |
| 316 } | 316 } |
| 317 | 317 |
| 318 Expect.equals(totalExpectedErrors, checkedResults); | 318 Expect.equals(totalExpectedErrors, checkedResults); |
| 319 }); | 319 }); |
| 320 } | 320 } |
| OLD | NEW |