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

Side by Side Diff: pkg/analysis_server/test/services/completion/completion_test_util.dart

Issue 804323002: refactor duplicate code into single visitor (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merge and address comments 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
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 test.services.completion.util; 5 library test.services.completion.util;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:analysis_server/src/protocol.dart' as protocol show Element, 9 import 'package:analysis_server/src/protocol.dart' as protocol show Element,
10 ElementKind; 10 ElementKind;
(...skipping 1378 matching lines...) Expand 10 before | Expand all | Expand 10 after
1389 CompletionSuggestion suggestionB = assertSuggestLocalClass('_B'); 1389 CompletionSuggestion suggestionB = assertSuggestLocalClass('_B');
1390 if (suggestionB != null) { 1390 if (suggestionB != null) {
1391 expect(suggestionB.element.isDeprecated, isFalse); 1391 expect(suggestionB.element.isDeprecated, isFalse);
1392 expect(suggestionB.element.isPrivate, isTrue); 1392 expect(suggestionB.element.isPrivate, isTrue);
1393 } 1393 }
1394 CompletionSuggestion suggestionO = assertSuggestImportedClass('Object'); 1394 CompletionSuggestion suggestionO = assertSuggestImportedClass('Object');
1395 if (suggestionO != null) { 1395 if (suggestionO != null) {
1396 expect(suggestionO.element.isDeprecated, isFalse); 1396 expect(suggestionO.element.isDeprecated, isFalse);
1397 expect(suggestionO.element.isPrivate, isFalse); 1397 expect(suggestionO.element.isPrivate, isFalse);
1398 } 1398 }
1399 assertSuggestLocalTopLevelVar('T', 'A'); 1399 assertNotSuggested('T');
1400 assertSuggestLibraryPrefix('x'); 1400 assertSuggestLibraryPrefix('x');
1401 }); 1401 });
1402 } 1402 }
1403 1403
1404 test_Combinator_hide() { 1404 test_Combinator_hide() {
1405 // SimpleIdentifier HideCombinator ImportDirective 1405 // SimpleIdentifier HideCombinator ImportDirective
1406 addSource('/testAB.dart', ''' 1406 addSource('/testAB.dart', '''
1407 library libAB; 1407 library libAB;
1408 part '/partAB.dart'; 1408 part '/partAB.dart';
1409 class A { } 1409 class A { }
(...skipping 1001 matching lines...) Expand 10 before | Expand all | Expand 10 after
2411 assertNotSuggested('bar2'); 2411 assertNotSuggested('bar2');
2412 assertNotSuggested('_B'); 2412 assertNotSuggested('_B');
2413 assertSuggestLocalClass('Y'); 2413 assertSuggestLocalClass('Y');
2414 assertSuggestLocalClass('C'); 2414 assertSuggestLocalClass('C');
2415 assertSuggestLocalVariable('f', null); 2415 assertSuggestLocalVariable('f', null);
2416 assertNotSuggested('x'); 2416 assertNotSuggested('x');
2417 assertNotSuggested('e'); 2417 assertNotSuggested('e');
2418 }); 2418 });
2419 } 2419 }
2420 } 2420 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698