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

Unified Diff: pkg/analysis_server/test/services/correction/name_suggestion_test.dart

Issue 646103006: Suggest names for PropertyAccess. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 2 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/analysis_server/lib/src/services/correction/name_suggestion.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/test/services/correction/name_suggestion_test.dart
diff --git a/pkg/analysis_server/test/services/correction/name_suggestion_test.dart b/pkg/analysis_server/test/services/correction/name_suggestion_test.dart
index 9ef37c3cde2ad790428475cd91b7ea5fc03ae9b4..05b43a3fe48c0998c83c75c632d4a4c42791b13d 100644
--- a/pkg/analysis_server/test/services/correction/name_suggestion_test.dart
+++ b/pkg/analysis_server/test/services/correction/name_suggestion_test.dart
@@ -290,7 +290,7 @@ main(p) {
unorderedEquals(['computeSuffix', 'suffix']));
}
- void test_forExpression_propertyAccess() {
+ void test_forExpression_prefixedIdentifier() {
resolveTestUnit('''
main(p) {
var res = p.sortedNodes;
@@ -305,6 +305,20 @@ main(p) {
unorderedEquals(['sortedNodes', 'nodes']));
}
+ void test_forExpression_propertyAccess() {
+ resolveTestUnit('''
+main(p) {
+ var res = p.q.sortedNodes;
+}
+''');
+ var excluded = new Set.from([]);
+ PropertyAccess expression =
+ findNodeAtString('p.q.sorted', (node) => node is PropertyAccess);
+ expect(
+ getVariableNameSuggestionsForExpression(null, expression, excluded),
+ unorderedEquals(['sortedNodes', 'nodes']));
+ }
+
void test_forExpression_simpleName() {
resolveTestUnit('''
main(p) {
« no previous file with comments | « pkg/analysis_server/lib/src/services/correction/name_suggestion.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698