| 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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 } | 121 } |
| 122 } | 122 } |
| 123 | 123 |
| 124 class TestBackend extends JavaScriptBackend { | 124 class TestBackend extends JavaScriptBackend { |
| 125 final TestCompiler compiler; | 125 final TestCompiler compiler; |
| 126 TestBackend(TestCompiler compiler) | 126 TestBackend(TestCompiler compiler) |
| 127 : this.compiler = compiler, | 127 : this.compiler = compiler, |
| 128 super(compiler, | 128 super(compiler, |
| 129 generateSourceMap: compiler.options.generateSourceMap, | 129 generateSourceMap: compiler.options.generateSourceMap, |
| 130 useStartupEmitter: compiler.options.useStartupEmitter, | 130 useStartupEmitter: compiler.options.useStartupEmitter, |
| 131 useMultiSourceInfo: compiler.options.useMultiSourceInfo, |
| 131 useNewSourceInfo: compiler.options.useNewSourceInfo, | 132 useNewSourceInfo: compiler.options.useNewSourceInfo, |
| 132 useKernel: compiler.options.useKernel); | 133 useKernel: compiler.options.useKernel); |
| 133 | 134 |
| 134 @override | 135 @override |
| 135 WorldImpact codegen(CodegenWorkItem work) { | 136 WorldImpact codegen(CodegenWorkItem work) { |
| 136 compiler.test('Compiler.codegen'); | 137 compiler.test('Compiler.codegen'); |
| 137 return super.codegen(work); | 138 return super.codegen(work); |
| 138 } | 139 } |
| 139 } | 140 } |
| 140 | 141 |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 311 | 312 |
| 312 expected = | 313 expected = |
| 313 _expectedExitCode(beforeRun: tests[marker], fatalWarnings: true); | 314 _expectedExitCode(beforeRun: tests[marker], fatalWarnings: true); |
| 314 totalExpectedErrors += expected.length; | 315 totalExpectedErrors += expected.length; |
| 315 await testExitCodes(marker, expected, ['--fatal-warnings']); | 316 await testExitCodes(marker, expected, ['--fatal-warnings']); |
| 316 } | 317 } |
| 317 | 318 |
| 318 Expect.equals(totalExpectedErrors, checkedResults); | 319 Expect.equals(totalExpectedErrors, checkedResults); |
| 319 }); | 320 }); |
| 320 } | 321 } |
| OLD | NEW |