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

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

Issue 900683002: Fix for issue 22178 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 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
« 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 library engine.parser_test; 5 library engine.parser_test;
6 6
7 import 'package:analyzer/src/generated/ast.dart'; 7 import 'package:analyzer/src/generated/ast.dart';
8 import 'package:analyzer/src/generated/element.dart'; 8 import 'package:analyzer/src/generated/element.dart';
9 import 'package:analyzer/src/generated/error.dart'; 9 import 'package:analyzer/src/generated/error.dart';
10 import 'package:analyzer/src/generated/incremental_scanner.dart'; 10 import 'package:analyzer/src/generated/incremental_scanner.dart';
(...skipping 761 matching lines...) Expand 10 before | Expand all | Expand 10 after
772 "abstract C f;", 772 "abstract C f;",
773 [ParserErrorCode.ABSTRACT_TOP_LEVEL_VARIABLE]); 773 [ParserErrorCode.ABSTRACT_TOP_LEVEL_VARIABLE]);
774 } 774 }
775 775
776 void test_abstractTypeDef() { 776 void test_abstractTypeDef() {
777 ParserTestCase.parseCompilationUnit( 777 ParserTestCase.parseCompilationUnit(
778 "abstract typedef F();", 778 "abstract typedef F();",
779 [ParserErrorCode.ABSTRACT_TYPEDEF]); 779 [ParserErrorCode.ABSTRACT_TYPEDEF]);
780 } 780 }
781 781
782 void test_annotationOnEnumConstant_first() {
783 ParserTestCase.parseCompilationUnit(
784 "enum E { @override C }",
785 [ParserErrorCode.ANNOTATION_ON_ENUM_CONSTANT]);
786 }
787
788 void test_annotationOnEnumConstant_middle() {
789 ParserTestCase.parseCompilationUnit(
790 "enum E { C, @override D, E }",
791 [ParserErrorCode.ANNOTATION_ON_ENUM_CONSTANT]);
792 }
793
782 void test_assertDoesNotTakeAssignment() { 794 void test_assertDoesNotTakeAssignment() {
783 ParserTestCase.parse4( 795 ParserTestCase.parse4(
784 "parseAssertStatement", 796 "parseAssertStatement",
785 "assert(b = true);", 797 "assert(b = true);",
786 [ParserErrorCode.ASSERT_DOES_NOT_TAKE_ASSIGNMENT]); 798 [ParserErrorCode.ASSERT_DOES_NOT_TAKE_ASSIGNMENT]);
787 } 799 }
788 800
789 void test_assertDoesNotTakeCascades() { 801 void test_assertDoesNotTakeCascades() {
790 ParserTestCase.parse4( 802 ParserTestCase.parse4(
791 "parseAssertStatement", 803 "parseAssertStatement",
(...skipping 10197 matching lines...) Expand 10 before | Expand all | Expand 10 after
10989 // Parse the source. 11001 // Parse the source.
10990 // 11002 //
10991 Parser parser = new Parser(null, listener); 11003 Parser parser = new Parser(null, listener);
10992 return invokeParserMethodImpl( 11004 return invokeParserMethodImpl(
10993 parser, 11005 parser,
10994 methodName, 11006 methodName,
10995 <Object>[tokenStream], 11007 <Object>[tokenStream],
10996 tokenStream) as Token; 11008 tokenStream) as Token;
10997 } 11009 }
10998 } 11010 }
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