| 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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 @override | 144 @override |
| 145 withCurrentElement(Element element, f()) { | 145 withCurrentElement(Element element, f()) { |
| 146 return super.withCurrentElement(element, () { | 146 return super.withCurrentElement(element, () { |
| 147 compiler.test('Compiler.withCurrentElement'); | 147 compiler.test('Compiler.withCurrentElement'); |
| 148 return f(); | 148 return f(); |
| 149 }); | 149 }); |
| 150 } | 150 } |
| 151 } | 151 } |
| 152 | 152 |
| 153 class TestScanner extends ScannerTask { | 153 class TestScanner extends ScannerTask { |
| 154 TestScanner(TestCompiler compiler) : super(compiler); | 154 TestScanner(TestCompiler compiler) |
| 155 : super(compiler, compiler.dietParser); |
| 155 | 156 |
| 156 TestCompiler get compiler => super.compiler; | 157 TestCompiler get compiler => super.compiler; |
| 157 | 158 |
| 158 void scanElements(CompilationUnitElement compilationUnit) { | 159 void scanElements(CompilationUnitElement compilationUnit) { |
| 159 compiler.test('ScannerTask.scanElements'); | 160 compiler.test('ScannerTask.scanElements'); |
| 160 super.scanElements(compilationUnit); | 161 super.scanElements(compilationUnit); |
| 161 } | 162 } |
| 162 } | 163 } |
| 163 | 164 |
| 164 class TestResolver extends ResolverTask { | 165 class TestResolver extends ResolverTask { |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 305 | 306 |
| 306 expected = _expectedExitCode( | 307 expected = _expectedExitCode( |
| 307 beforeRun: tests[marker], fatalWarnings: true); | 308 beforeRun: tests[marker], fatalWarnings: true); |
| 308 totalExpectedErrors += expected.length; | 309 totalExpectedErrors += expected.length; |
| 309 await testExitCodes(marker, expected, ['--fatal-warnings']); | 310 await testExitCodes(marker, expected, ['--fatal-warnings']); |
| 310 } | 311 } |
| 311 | 312 |
| 312 Expect.equals(totalExpectedErrors, checkedResults); | 313 Expect.equals(totalExpectedErrors, checkedResults); |
| 313 }); | 314 }); |
| 314 } | 315 } |
| OLD | NEW |