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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 compiler.test('ScannerTask.scanElements'); | 162 compiler.test('ScannerTask.scanElements'); |
163 super.scanElements(compilationUnit); | 163 super.scanElements(compilationUnit); |
164 } | 164 } |
165 } | 165 } |
166 | 166 |
167 class TestResolver extends ResolverTask { | 167 class TestResolver extends ResolverTask { |
168 final TestCompiler compiler; | 168 final TestCompiler compiler; |
169 | 169 |
170 TestResolver(TestCompiler compiler, ConstantCompiler constantCompiler) | 170 TestResolver(TestCompiler compiler, ConstantCompiler constantCompiler) |
171 : this.compiler = compiler, | 171 : this.compiler = compiler, |
172 super(compiler.resolution, constantCompiler, compiler.openWorld, | 172 super(compiler.resolution, constantCompiler, compiler.measurer); |
173 compiler.measurer); | |
174 | 173 |
175 void computeClassMembers(ClassElement element) { | 174 void computeClassMembers(ClassElement element) { |
176 compiler.test('ResolverTask.computeClassMembers'); | 175 compiler.test('ResolverTask.computeClassMembers'); |
177 super.computeClassMembers(element); | 176 super.computeClassMembers(element); |
178 } | 177 } |
179 } | 178 } |
180 | 179 |
181 class TestResolution extends CompilerResolution { | 180 class TestResolution extends CompilerResolution { |
182 TestCompiler compiler; | 181 TestCompiler compiler; |
183 | 182 |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
312 | 311 |
313 expected = | 312 expected = |
314 _expectedExitCode(beforeRun: tests[marker], fatalWarnings: true); | 313 _expectedExitCode(beforeRun: tests[marker], fatalWarnings: true); |
315 totalExpectedErrors += expected.length; | 314 totalExpectedErrors += expected.length; |
316 await testExitCodes(marker, expected, ['--fatal-warnings']); | 315 await testExitCodes(marker, expected, ['--fatal-warnings']); |
317 } | 316 } |
318 | 317 |
319 Expect.equals(totalExpectedErrors, checkedResults); | 318 Expect.equals(totalExpectedErrors, checkedResults); |
320 }); | 319 }); |
321 } | 320 } |
OLD | NEW |