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

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

Issue 749283007: Fix for issue 18598 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years 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 4260 matching lines...) Expand 10 before | Expand all | Expand 10 after
4271 [ 4271 [
4272 ParserErrorCode.MISSING_IDENTIFIER, 4272 ParserErrorCode.MISSING_IDENTIFIER,
4273 ParserErrorCode.MISSING_IDENTIFIER, 4273 ParserErrorCode.MISSING_IDENTIFIER,
4274 ParserErrorCode.EQUALITY_CANNOT_BE_EQUALITY_OPERAND]); 4274 ParserErrorCode.EQUALITY_CANNOT_BE_EQUALITY_OPERAND]);
4275 EngineTestCase.assertInstanceOf( 4275 EngineTestCase.assertInstanceOf(
4276 (obj) => obj is BinaryExpression, 4276 (obj) => obj is BinaryExpression,
4277 BinaryExpression, 4277 BinaryExpression,
4278 expression.leftOperand); 4278 expression.leftOperand);
4279 } 4279 }
4280 4280
4281 void test_nonStringLiteralUri_import() {
4282 ParserTestCase.parseCompilationUnit(
4283 "import dart:io; class C {}",
4284 [ParserErrorCode.NON_STRING_LITERAL_AS_URI]);
4285 }
4286
4281 void test_prefixExpression_missing_operand_minus() { 4287 void test_prefixExpression_missing_operand_minus() {
4282 PrefixExpression expression = 4288 PrefixExpression expression =
4283 ParserTestCase.parseExpression("-", [ParserErrorCode.MISSING_IDENTIFIER] ); 4289 ParserTestCase.parseExpression("-", [ParserErrorCode.MISSING_IDENTIFIER] );
4284 EngineTestCase.assertInstanceOf( 4290 EngineTestCase.assertInstanceOf(
4285 (obj) => obj is SimpleIdentifier, 4291 (obj) => obj is SimpleIdentifier,
4286 SimpleIdentifier, 4292 SimpleIdentifier,
4287 expression.operand); 4293 expression.operand);
4288 expect(expression.operand.isSynthetic, isTrue); 4294 expect(expression.operand.isSynthetic, isTrue);
4289 expect(expression.operator.type, TokenType.MINUS); 4295 expect(expression.operator.type, TokenType.MINUS);
4290 } 4296 }
(...skipping 6625 matching lines...) Expand 10 before | Expand all | Expand 10 after
10916 // Parse the source. 10922 // Parse the source.
10917 // 10923 //
10918 Parser parser = new Parser(null, listener); 10924 Parser parser = new Parser(null, listener);
10919 return invokeParserMethodImpl( 10925 return invokeParserMethodImpl(
10920 parser, 10926 parser,
10921 methodName, 10927 methodName,
10922 <Object>[tokenStream], 10928 <Object>[tokenStream],
10923 tokenStream) as Token; 10929 tokenStream) as Token;
10924 } 10930 }
10925 } 10931 }
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