| 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 Future onLibrariesLoaded(LoadedLibraries loadedLibraries) { | 72 Future onLibrariesLoaded(LoadedLibraries loadedLibraries) { |
| 73 test('Compiler.onLibrariesLoaded'); | 73 test('Compiler.onLibrariesLoaded'); |
| 74 return super.onLibrariesLoaded(loadedLibraries); | 74 return super.onLibrariesLoaded(loadedLibraries); |
| 75 } | 75 } |
| 76 | 76 |
| 77 WorldImpact analyzeElement(Element element) { | 77 WorldImpact analyzeElement(Element element) { |
| 78 test('Compiler.analyzeElement'); | 78 test('Compiler.analyzeElement'); |
| 79 return super.analyzeElement(element); | 79 return super.analyzeElement(element); |
| 80 } | 80 } |
| 81 | 81 |
| 82 WorldImpact codegen(CodegenWorkItem work, CodegenEnqueuer world) { | 82 WorldImpact codegen(CodegenWorkItem work, Enqueuer world) { |
| 83 test('Compiler.codegen'); | 83 test('Compiler.codegen'); |
| 84 return super.codegen(work, world); | 84 return super.codegen(work, world); |
| 85 } | 85 } |
| 86 | 86 |
| 87 test(String marker) { | 87 test(String marker) { |
| 88 if (marker == testMarker) { | 88 if (marker == testMarker) { |
| 89 switch (testType) { | 89 switch (testType) { |
| 90 case 'assert': | 90 case 'assert': |
| 91 onTest(testMarker, testType); | 91 onTest(testMarker, testType); |
| 92 assert(false); | 92 assert(false); |
| (...skipping 194 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 |