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

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

Issue 713953002: Fix hurt recovery (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « pkg/analyzer/lib/src/generated/parser.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/error.dart'; 10 import 'package:analyzer/src/generated/error.dart';
(...skipping 2461 matching lines...) Expand 10 before | Expand all | Expand 10 after
2472 } 2472 }
2473 2473
2474 void test_incomplete_constructorInitializers_empty() { 2474 void test_incomplete_constructorInitializers_empty() {
2475 ParserTestCase.parse3( 2475 ParserTestCase.parse3(
2476 "parseClassMember", 2476 "parseClassMember",
2477 ["C"], 2477 ["C"],
2478 "C() : {}", 2478 "C() : {}",
2479 [ParserErrorCode.MISSING_INITIALIZER]); 2479 [ParserErrorCode.MISSING_INITIALIZER]);
2480 } 2480 }
2481 2481
2482 void test_incomplete_constructorInitializers_missingEquals() {
2483 ClassMember member = ParserTestCase.parse3(
2484 "parseClassMember",
2485 ["C"],
2486 "C() : x(3) {}",
2487 [ParserErrorCode.MISSING_ASSIGNMENT_IN_INITIALIZER]);
2488 expect(member, new isInstanceOf<ConstructorDeclaration>());
2489 NodeList<ConstructorInitializer> initializers = (member as ConstructorDeclar ation).initializers;
2490 expect(initializers, hasLength(1));
2491 ConstructorInitializer initializer = initializers[0];
2492 expect(initializer, new isInstanceOf<ConstructorFieldInitializer>());
2493 Expression expression = (initializer as ConstructorFieldInitializer).express ion;
2494 expect(expression, isNotNull);
2495 expect(expression, new isInstanceOf<ParenthesizedExpression>());
2496 }
2497
2482 void test_incomplete_constructorInitializers_variable() { 2498 void test_incomplete_constructorInitializers_variable() {
2483 ParserTestCase.parse3( 2499 ParserTestCase.parse3(
2484 "parseClassMember", 2500 "parseClassMember",
2485 ["C"], 2501 ["C"],
2486 "C() : x {}", 2502 "C() : x {}",
2487 [ParserErrorCode.MISSING_ASSIGNMENT_IN_INITIALIZER]); 2503 [ParserErrorCode.MISSING_ASSIGNMENT_IN_INITIALIZER]);
2488 } 2504 }
2489 2505
2490 void test_incomplete_topLevelVariable() { 2506 void test_incomplete_topLevelVariable() {
2491 CompilationUnit unit = ParserTestCase.parseCompilationUnit("String", [Parser ErrorCode.EXPECTED_EXECUTABLE]); 2507 CompilationUnit unit = ParserTestCase.parseCompilationUnit("String", [Parser ErrorCode.EXPECTED_EXECUTABLE]);
(...skipping 5824 matching lines...) Expand 10 before | Expand all | Expand 10 after
8316 main() { 8332 main() {
8317 groupSep = ' | '; 8333 groupSep = ' | ';
8318 runReflectiveTests(ComplexParserTest); 8334 runReflectiveTests(ComplexParserTest);
8319 runReflectiveTests(ErrorParserTest); 8335 runReflectiveTests(ErrorParserTest);
8320 runReflectiveTests(IncrementalParserTest); 8336 runReflectiveTests(IncrementalParserTest);
8321 runReflectiveTests(NonErrorParserTest); 8337 runReflectiveTests(NonErrorParserTest);
8322 runReflectiveTests(RecoveryParserTest); 8338 runReflectiveTests(RecoveryParserTest);
8323 runReflectiveTests(ResolutionCopierTest); 8339 runReflectiveTests(ResolutionCopierTest);
8324 runReflectiveTests(SimpleParserTest); 8340 runReflectiveTests(SimpleParserTest);
8325 } 8341 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/generated/parser.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698