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

Unified Diff: pkg/analyzer/test/dart/ast/ast_test.dart

Issue 2844343002: Tests for SimpleIdentifier.inGetterContext() updated in other CL. (Closed)
Patch Set: Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/dart/ast/ast_test.dart
diff --git a/pkg/analyzer/test/dart/ast/ast_test.dart b/pkg/analyzer/test/dart/ast/ast_test.dart
index 494cb07b663f23d8ae98d92841589e1d87309098..2d9982ca239cfc5df61988a1a6dd40daa190de13 100644
--- a/pkg/analyzer/test/dart/ast/ast_test.dart
+++ b/pkg/analyzer/test/dart/ast/ast_test.dart
@@ -631,6 +631,13 @@ class SimpleIdentifierTest extends ParserTestCase {
expect(identifier.inGetterContext(), isFalse);
}
+ void test_inGetterContext_fieldFormalParameter() {
+ FieldFormalParameter parameter =
+ AstTestFactory.fieldFormalParameter2('test');
+ SimpleIdentifier identifier = parameter.identifier;
+ expect(identifier.inGetterContext(), isFalse);
+ }
+
void test_inGetterContext_forEachLoop() {
SimpleIdentifier identifier = AstTestFactory.identifier3("a");
Expression iterator = AstTestFactory.listLiteral();
@@ -639,6 +646,12 @@ class SimpleIdentifierTest extends ParserTestCase {
expect(identifier.inGetterContext(), isFalse);
}
+ void test_inGetterContext_variableDeclaration() {
+ VariableDeclaration variable = AstTestFactory.variableDeclaration('testt');
Brian Wilkerson 2017/04/27 17:34:16 nit: doubled 't'
+ SimpleIdentifier identifier = variable.name;
+ expect(identifier.inGetterContext(), isFalse);
+ }
+
void test_inReferenceContext() {
SimpleIdentifier identifier = AstTestFactory.identifier3("id");
AstTestFactory.namedExpression(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698