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

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

Issue 2347213002: Rename libraryUri (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « pkg/analyzer/lib/src/summary/public_namespace_computer.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 analyzer.test.generated.parser_test; 5 library analyzer.test.generated.parser_test;
6 6
7 import 'package:analyzer/dart/ast/ast.dart'; 7 import 'package:analyzer/dart/ast/ast.dart';
8 import 'package:analyzer/dart/ast/token.dart'; 8 import 'package:analyzer/dart/ast/token.dart';
9 import 'package:analyzer/dart/ast/visitor.dart'; 9 import 'package:analyzer/dart/ast/visitor.dart';
10 import 'package:analyzer/error/error.dart'; 10 import 'package:analyzer/error/error.dart';
(...skipping 6630 matching lines...) Expand 10 before | Expand all | Expand 10 after
6641 6641
6642 void test_parseConfiguration_noOperator_dottedIdentifier() { 6642 void test_parseConfiguration_noOperator_dottedIdentifier() {
6643 Configuration configuration = 6643 Configuration configuration =
6644 parse4('parseConfiguration', "if (a.b) 'c.dart'"); 6644 parse4('parseConfiguration', "if (a.b) 'c.dart'");
6645 expect(configuration.ifKeyword, isNotNull); 6645 expect(configuration.ifKeyword, isNotNull);
6646 expect(configuration.leftParenthesis, isNotNull); 6646 expect(configuration.leftParenthesis, isNotNull);
6647 _expectDottedName(configuration.name, ["a", "b"]); 6647 _expectDottedName(configuration.name, ["a", "b"]);
6648 expect(configuration.equalToken, isNull); 6648 expect(configuration.equalToken, isNull);
6649 expect(configuration.value, isNull); 6649 expect(configuration.value, isNull);
6650 expect(configuration.rightParenthesis, isNotNull); 6650 expect(configuration.rightParenthesis, isNotNull);
6651 expect(configuration.libraryUri, isNotNull); 6651 expect(configuration.uri, isNotNull);
6652 } 6652 }
6653 6653
6654 void test_parseConfiguration_noOperator_simpleIdentifier() { 6654 void test_parseConfiguration_noOperator_simpleIdentifier() {
6655 Configuration configuration = 6655 Configuration configuration =
6656 parse4('parseConfiguration', "if (a) 'b.dart'"); 6656 parse4('parseConfiguration', "if (a) 'b.dart'");
6657 expect(configuration.ifKeyword, isNotNull); 6657 expect(configuration.ifKeyword, isNotNull);
6658 expect(configuration.leftParenthesis, isNotNull); 6658 expect(configuration.leftParenthesis, isNotNull);
6659 _expectDottedName(configuration.name, ["a"]); 6659 _expectDottedName(configuration.name, ["a"]);
6660 expect(configuration.equalToken, isNull); 6660 expect(configuration.equalToken, isNull);
6661 expect(configuration.value, isNull); 6661 expect(configuration.value, isNull);
6662 expect(configuration.rightParenthesis, isNotNull); 6662 expect(configuration.rightParenthesis, isNotNull);
6663 expect(configuration.libraryUri, isNotNull); 6663 expect(configuration.uri, isNotNull);
6664 } 6664 }
6665 6665
6666 void test_parseConfiguration_operator_dottedIdentifier() { 6666 void test_parseConfiguration_operator_dottedIdentifier() {
6667 Configuration configuration = 6667 Configuration configuration =
6668 parse4('parseConfiguration', "if (a.b == 'c') 'd.dart'"); 6668 parse4('parseConfiguration', "if (a.b == 'c') 'd.dart'");
6669 expect(configuration.ifKeyword, isNotNull); 6669 expect(configuration.ifKeyword, isNotNull);
6670 expect(configuration.leftParenthesis, isNotNull); 6670 expect(configuration.leftParenthesis, isNotNull);
6671 _expectDottedName(configuration.name, ["a", "b"]); 6671 _expectDottedName(configuration.name, ["a", "b"]);
6672 expect(configuration.equalToken, isNotNull); 6672 expect(configuration.equalToken, isNotNull);
6673 expect(configuration.value, isNotNull); 6673 expect(configuration.value, isNotNull);
6674 expect(configuration.rightParenthesis, isNotNull); 6674 expect(configuration.rightParenthesis, isNotNull);
6675 expect(configuration.libraryUri, isNotNull); 6675 expect(configuration.uri, isNotNull);
6676 } 6676 }
6677 6677
6678 void test_parseConfiguration_operator_simpleIdentifier() { 6678 void test_parseConfiguration_operator_simpleIdentifier() {
6679 Configuration configuration = 6679 Configuration configuration =
6680 parse4('parseConfiguration', "if (a == 'b') 'c.dart'"); 6680 parse4('parseConfiguration', "if (a == 'b') 'c.dart'");
6681 expect(configuration.ifKeyword, isNotNull); 6681 expect(configuration.ifKeyword, isNotNull);
6682 expect(configuration.leftParenthesis, isNotNull); 6682 expect(configuration.leftParenthesis, isNotNull);
6683 _expectDottedName(configuration.name, ["a"]); 6683 _expectDottedName(configuration.name, ["a"]);
6684 expect(configuration.equalToken, isNotNull); 6684 expect(configuration.equalToken, isNotNull);
6685 expect(configuration.value, isNotNull); 6685 expect(configuration.value, isNotNull);
6686 expect(configuration.rightParenthesis, isNotNull); 6686 expect(configuration.rightParenthesis, isNotNull);
6687 expect(configuration.libraryUri, isNotNull); 6687 expect(configuration.uri, isNotNull);
6688 } 6688 }
6689 6689
6690 void test_parseConstExpression_instanceCreation() { 6690 void test_parseConstExpression_instanceCreation() {
6691 InstanceCreationExpression expression = 6691 InstanceCreationExpression expression =
6692 parse4("parseConstExpression", "const A()"); 6692 parse4("parseConstExpression", "const A()");
6693 expect(expression.keyword, isNotNull); 6693 expect(expression.keyword, isNotNull);
6694 ConstructorName name = expression.constructorName; 6694 ConstructorName name = expression.constructorName;
6695 expect(name, isNotNull); 6695 expect(name, isNotNull);
6696 expect(name.type, isNotNull); 6696 expect(name.type, isNotNull);
6697 expect(name.period, isNull); 6697 expect(name.period, isNull);
(...skipping 4308 matching lines...) Expand 10 before | Expand all | Expand 10 after
11006 new Scanner(null, new CharSequenceReader(source), listener); 11006 new Scanner(null, new CharSequenceReader(source), listener);
11007 Token tokenStream = scanner.tokenize(); 11007 Token tokenStream = scanner.tokenize();
11008 // 11008 //
11009 // Parse the source. 11009 // Parse the source.
11010 // 11010 //
11011 Parser parser = new Parser(null, listener); 11011 Parser parser = new Parser(null, listener);
11012 return invokeParserMethodImpl( 11012 return invokeParserMethodImpl(
11013 parser, methodName, <Object>[tokenStream], tokenStream) as Token; 11013 parser, methodName, <Object>[tokenStream], tokenStream) as Token;
11014 } 11014 }
11015 } 11015 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/summary/public_namespace_computer.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698