| 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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 } | 150 } |
| 151 | 151 |
| 152 class TestResolver extends ResolverTask { | 152 class TestResolver extends ResolverTask { |
| 153 final TestCompiler compiler; | 153 final TestCompiler compiler; |
| 154 | 154 |
| 155 TestResolver(TestCompiler compiler, ConstantCompiler constantCompiler) | 155 TestResolver(TestCompiler compiler, ConstantCompiler constantCompiler) |
| 156 : this.compiler = compiler, | 156 : this.compiler = compiler, |
| 157 super( | 157 super( |
| 158 compiler.resolution, | 158 compiler.resolution, |
| 159 constantCompiler, | 159 constantCompiler, |
| 160 compiler.world, | 160 compiler.openWorld, |
| 161 compiler.measurer); | 161 compiler.measurer); |
| 162 | 162 |
| 163 void computeClassMembers(ClassElement element) { | 163 void computeClassMembers(ClassElement element) { |
| 164 compiler.test('ResolverTask.computeClassMembers'); | 164 compiler.test('ResolverTask.computeClassMembers'); |
| 165 super.computeClassMembers(element); | 165 super.computeClassMembers(element); |
| 166 } | 166 } |
| 167 } | 167 } |
| 168 | 168 |
| 169 int checkedResults = 0; | 169 int checkedResults = 0; |
| 170 | 170 |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 | 287 |
| 288 expected = _expectedExitCode( | 288 expected = _expectedExitCode( |
| 289 beforeRun: tests[marker], fatalWarnings: true); | 289 beforeRun: tests[marker], fatalWarnings: true); |
| 290 totalExpectedErrors += expected.length; | 290 totalExpectedErrors += expected.length; |
| 291 await testExitCodes(marker, expected, ['--fatal-warnings']); | 291 await testExitCodes(marker, expected, ['--fatal-warnings']); |
| 292 } | 292 } |
| 293 | 293 |
| 294 Expect.equals(totalExpectedErrors, checkedResults); | 294 Expect.equals(totalExpectedErrors, checkedResults); |
| 295 }); | 295 }); |
| 296 } | 296 } |
| OLD | NEW |