| 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 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 api.CompilerDiagnostics handler, | 43 api.CompilerDiagnostics handler, |
| 44 Uri libraryRoot, | 44 Uri libraryRoot, |
| 45 Uri packageRoot, | 45 Uri packageRoot, |
| 46 List<String> options, | 46 List<String> options, |
| 47 Map<String, dynamic> environment, | 47 Map<String, dynamic> environment, |
| 48 Uri packageConfig, | 48 Uri packageConfig, |
| 49 api.PackagesDiscoveryProvider findPackages, | 49 api.PackagesDiscoveryProvider findPackages, |
| 50 String this.testMarker, | 50 String this.testMarker, |
| 51 String this.testType, | 51 String this.testType, |
| 52 Function this.onTest) | 52 Function this.onTest) |
| 53 : super(inputProvider, outputProvider, handler, libraryRoot, | 53 : super(inputProvider, outputProvider, handler, |
| 54 packageRoot, options, environment, packageConfig, findPackages) { | 54 new api.CompilerOptions.parse( |
| 55 libraryRoot: libraryRoot, |
| 56 packageRoot: packageRoot, |
| 57 options: options, |
| 58 environment: environment, |
| 59 packageConfig: packageConfig, |
| 60 packagesDiscoveryProvider: findPackages)) { |
| 55 scanner = new TestScanner(this); | 61 scanner = new TestScanner(this); |
| 56 resolver = new TestResolver(this, backend.constantCompilerTask); | 62 resolver = new TestResolver(this, backend.constantCompilerTask); |
| 57 reporter = new TestDiagnosticReporter(this, super.reporter); | 63 reporter = new TestDiagnosticReporter(this, super.reporter); |
| 58 test('Compiler'); | 64 test('Compiler'); |
| 59 } | 65 } |
| 60 | 66 |
| 61 Future<bool> run(Uri uri) { | 67 Future<bool> run(Uri uri) { |
| 62 test('Compiler.run'); | 68 test('Compiler.run'); |
| 63 return super.run(uri); | 69 return super.run(uri); |
| 64 } | 70 } |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 | 298 |
| 293 expected = _expectedExitCode( | 299 expected = _expectedExitCode( |
| 294 beforeRun: tests[marker], fatalWarnings: true); | 300 beforeRun: tests[marker], fatalWarnings: true); |
| 295 totalExpectedErrors += expected.length; | 301 totalExpectedErrors += expected.length; |
| 296 await testExitCodes(marker, expected, ['--fatal-warnings']); | 302 await testExitCodes(marker, expected, ['--fatal-warnings']); |
| 297 } | 303 } |
| 298 | 304 |
| 299 Expect.equals(totalExpectedErrors, checkedResults); | 305 Expect.equals(totalExpectedErrors, checkedResults); |
| 300 }); | 306 }); |
| 301 } | 307 } |
| OLD | NEW |