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

Unified Diff: pkg/analyzer/test/generated/element_resolver_test.dart

Issue 2168833003: Support references to operators in doc comments (issue 26929) (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 5 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 | « pkg/analyzer/lib/src/generated/parser.dart ('k') | pkg/analyzer/test/generated/parser_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/generated/element_resolver_test.dart
diff --git a/pkg/analyzer/test/generated/element_resolver_test.dart b/pkg/analyzer/test/generated/element_resolver_test.dart
index da95f04e01ee2fa33f44a8872a8c669b3878bdc7..a98bdb58bb2e27afcff4e8fa8cff62a499aa4253 100644
--- a/pkg/analyzer/test/generated/element_resolver_test.dart
+++ b/pkg/analyzer/test/generated/element_resolver_test.dart
@@ -301,6 +301,25 @@ class ElementResolverTest extends EngineTestCase {
_listener.assertNoErrors();
}
+ void test_visitCommentReference_prefixedIdentifier_class_operator() {
+ ClassElementImpl classA = ElementFactory.classElement2("A");
+ // set method
+ MethodElement method =
+ ElementFactory.methodElement("==", _typeProvider.boolType);
+ classA.methods = <MethodElement>[method];
+ // set name scope
+ _visitor.nameScope = new EnclosedScope(null)
+ ..defineNameWithoutChecking('A', classA);
+ // prepare "A.m"
scheglov 2016/07/21 15:38:13 "A.=="
Brian Wilkerson 2016/07/21 15:43:44 Done
+ PrefixedIdentifier prefixed = AstFactory.identifier5('A', '==');
+ CommentReference commentReference = new CommentReference(null, prefixed);
+ // resolve
+ _resolveNode(commentReference);
+ expect(prefixed.prefix.staticElement, classA);
+ expect(prefixed.identifier.staticElement, method);
+ _listener.assertNoErrors();
+ }
+
void test_visitConstructorName_named() {
ClassElementImpl classA = ElementFactory.classElement2("A");
String constructorName = "a";
« no previous file with comments | « pkg/analyzer/lib/src/generated/parser.dart ('k') | pkg/analyzer/test/generated/parser_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698