Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(369)

Side by Side Diff: pkg/analyzer/test/generated/parser_test.dart

Issue 192363003: Translate Java's @Override into Dart's @override. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 6758 matching lines...) Expand 10 before | Expand all | Expand 10 after
6769 }); 6769 });
6770 _ut.test('test_skipTypeName_simple', () { 6770 _ut.test('test_skipTypeName_simple', () {
6771 final __test = new SimpleParserTest(); 6771 final __test = new SimpleParserTest();
6772 runJUnitTest(__test, __test.test_skipTypeName_simple); 6772 runJUnitTest(__test, __test.test_skipTypeName_simple);
6773 }); 6773 });
6774 }); 6774 });
6775 } 6775 }
6776 } 6776 }
6777 6777
6778 class AnalysisErrorListener_SimpleParserTest_computeStringValue implements Analy sisErrorListener { 6778 class AnalysisErrorListener_SimpleParserTest_computeStringValue implements Analy sisErrorListener {
6779 @override
6779 void onError(AnalysisError event) { 6780 void onError(AnalysisError event) {
6780 JUnitTestCase.fail("Unexpected compilation error: ${event.message} (${event. offset}, ${event.length})"); 6781 JUnitTestCase.fail("Unexpected compilation error: ${event.message} (${event. offset}, ${event.length})");
6781 } 6782 }
6782 } 6783 }
6783 6784
6784 class NonErrorParserTest extends ParserTestCase { 6785 class NonErrorParserTest extends ParserTestCase {
6785 void test_constFactory_external() { 6786 void test_constFactory_external() {
6786 ParserTestCase.parse("parseClassMember", <Object> ["C"], "external const fac tory C();"); 6787 ParserTestCase.parse("parseClassMember", <Object> ["C"], "external const fac tory C();");
6787 } 6788 }
6788 6789
(...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after
7519 return new CommentAndMetadata(comment, metadata); 7520 return new CommentAndMetadata(comment, metadata);
7520 } 7521 }
7521 7522
7522 /** 7523 /**
7523 * Return an empty CommentAndMetadata object that can be used for testing. 7524 * Return an empty CommentAndMetadata object that can be used for testing.
7524 * 7525 *
7525 * @return an empty CommentAndMetadata object that can be used for testing 7526 * @return an empty CommentAndMetadata object that can be used for testing
7526 */ 7527 */
7527 CommentAndMetadata emptyCommentAndMetadata() => new CommentAndMetadata(null, n ew List<Annotation>()); 7528 CommentAndMetadata emptyCommentAndMetadata() => new CommentAndMetadata(null, n ew List<Annotation>());
7528 7529
7530 @override
7529 void setUp() { 7531 void setUp() {
7530 super.setUp(); 7532 super.setUp();
7531 parseFunctionBodies = true; 7533 parseFunctionBodies = true;
7532 } 7534 }
7533 7535
7534 static dartSuite() { 7536 static dartSuite() {
7535 _ut.group('ParserTestCase', () { 7537 _ut.group('ParserTestCase', () {
7536 }); 7538 });
7537 } 7539 }
7538 } 7540 }
(...skipping 17 matching lines...) Expand all
7556 JavaStringBuilder builder = new JavaStringBuilder(); 7558 JavaStringBuilder builder = new JavaStringBuilder();
7557 builder.append("Invalid AST structure:"); 7559 builder.append("Invalid AST structure:");
7558 for (String message in _errors) { 7560 for (String message in _errors) {
7559 builder.append("\r\n "); 7561 builder.append("\r\n ");
7560 builder.append(message); 7562 builder.append(message);
7561 } 7563 }
7562 JUnitTestCase.fail(builder.toString()); 7564 JUnitTestCase.fail(builder.toString());
7563 } 7565 }
7564 } 7566 }
7565 7567
7568 @override
7566 Object visitNode(AstNode node) { 7569 Object visitNode(AstNode node) {
7567 _validate(node); 7570 _validate(node);
7568 return super.visitNode(node); 7571 return super.visitNode(node);
7569 } 7572 }
7570 7573
7571 /** 7574 /**
7572 * Validate that the given AST node is correctly constructed. 7575 * Validate that the given AST node is correctly constructed.
7573 * 7576 *
7574 * @param node the AST node being validated 7577 * @param node the AST node being validated
7575 */ 7578 */
(...skipping 4146 matching lines...) Expand 10 before | Expand all | Expand 10 after
11722 11725
11723 main() { 11726 main() {
11724 ComplexParserTest.dartSuite(); 11727 ComplexParserTest.dartSuite();
11725 ErrorParserTest.dartSuite(); 11728 ErrorParserTest.dartSuite();
11726 IncrementalParserTest.dartSuite(); 11729 IncrementalParserTest.dartSuite();
11727 NonErrorParserTest.dartSuite(); 11730 NonErrorParserTest.dartSuite();
11728 RecoveryParserTest.dartSuite(); 11731 RecoveryParserTest.dartSuite();
11729 ResolutionCopierTest.dartSuite(); 11732 ResolutionCopierTest.dartSuite();
11730 SimpleParserTest.dartSuite(); 11733 SimpleParserTest.dartSuite();
11731 } 11734 }
OLDNEW
« no previous file with comments | « pkg/analyzer/test/generated/element_test.dart ('k') | pkg/analyzer/test/generated/resolver_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698