| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 // This code was auto-generated, is not intended to be edited, and is subject to | 5 // This code was auto-generated, is not intended to be edited, and is subject to |
| 6 // significant change. Please see the README file for more information. | 6 // significant change. Please see the README file for more information. |
| 7 | 7 |
| 8 library engine.parser_test; | 8 library engine.parser_test; |
| 9 | 9 |
| 10 import 'package:analyzer/src/generated/java_core.dart'; | 10 import 'package:analyzer/src/generated/java_core.dart'; |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 * A list containing the errors found while traversing the AST structure. | 41 * A list containing the errors found while traversing the AST structure. |
| 42 */ | 42 */ |
| 43 List<String> _errors = new List<String>(); | 43 List<String> _errors = new List<String>(); |
| 44 | 44 |
| 45 /** | 45 /** |
| 46 * Assert that no errors were found while traversing any of the AST structures
that have been | 46 * Assert that no errors were found while traversing any of the AST structures
that have been |
| 47 * visited. | 47 * visited. |
| 48 */ | 48 */ |
| 49 void assertValid() { | 49 void assertValid() { |
| 50 if (!_errors.isEmpty) { | 50 if (!_errors.isEmpty) { |
| 51 JavaStringBuilder builder = new JavaStringBuilder(); | 51 StringBuffer buffer = new StringBuffer(); |
| 52 builder.append("Invalid AST structure:"); | 52 buffer.write("Invalid AST structure:"); |
| 53 for (String message in _errors) { | 53 for (String message in _errors) { |
| 54 builder.append("\r\n "); | 54 buffer.write("\r\n "); |
| 55 builder.append(message); | 55 buffer.write(message); |
| 56 } | 56 } |
| 57 JUnitTestCase.fail(builder.toString()); | 57 JUnitTestCase.fail(buffer.toString()); |
| 58 } | 58 } |
| 59 } | 59 } |
| 60 | 60 |
| 61 @override | 61 @override |
| 62 Object visitNode(AstNode node) { | 62 Object visitNode(AstNode node) { |
| 63 _validate(node); | 63 _validate(node); |
| 64 return super.visitNode(node); | 64 return super.visitNode(node); |
| 65 } | 65 } |
| 66 | 66 |
| 67 /** | 67 /** |
| (...skipping 8192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8260 main() { | 8260 main() { |
| 8261 _ut.groupSep = ' | '; | 8261 _ut.groupSep = ' | '; |
| 8262 runReflectiveTests(ComplexParserTest); | 8262 runReflectiveTests(ComplexParserTest); |
| 8263 runReflectiveTests(ErrorParserTest); | 8263 runReflectiveTests(ErrorParserTest); |
| 8264 runReflectiveTests(IncrementalParserTest); | 8264 runReflectiveTests(IncrementalParserTest); |
| 8265 runReflectiveTests(NonErrorParserTest); | 8265 runReflectiveTests(NonErrorParserTest); |
| 8266 runReflectiveTests(RecoveryParserTest); | 8266 runReflectiveTests(RecoveryParserTest); |
| 8267 runReflectiveTests(ResolutionCopierTest); | 8267 runReflectiveTests(ResolutionCopierTest); |
| 8268 runReflectiveTests(SimpleParserTest); | 8268 runReflectiveTests(SimpleParserTest); |
| 8269 } | 8269 } |
| OLD | NEW |