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

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

Issue 1069813002: fix NSMError in completion (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pkg/analysis_server/test/services/completion/arglist_contributor_test.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 test.services.completion.dart.keyword; 5 library test.services.completion.dart.keyword;
6 6
7 import 'package:analysis_server/src/protocol.dart'; 7 import 'package:analysis_server/src/protocol.dart';
8 import 'package:analysis_server/src/services/completion/dart_completion_manager. dart'; 8 import 'package:analysis_server/src/services/completion/dart_completion_manager. dart';
9 import 'package:analysis_server/src/services/completion/keyword_contributor.dart '; 9 import 'package:analysis_server/src/services/completion/keyword_contributor.dart ';
10 import 'package:analyzer/src/generated/scanner.dart'; 10 import 'package:analyzer/src/generated/scanner.dart';
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 expect(computeFast(), isTrue); 445 expect(computeFast(), isTrue);
446 assertSuggestKeywords([Keyword.AS, Keyword.DEFERRED], DART_RELEVANCE_HIGH); 446 assertSuggestKeywords([Keyword.AS, Keyword.DEFERRED], DART_RELEVANCE_HIGH);
447 } 447 }
448 448
449 test_import_deferred4() { 449 test_import_deferred4() {
450 addTestSource('import "foo" d^ hide foo;'); 450 addTestSource('import "foo" d^ hide foo;');
451 expect(computeFast(), isTrue); 451 expect(computeFast(), isTrue);
452 assertSuggestKeywords([Keyword.AS, Keyword.DEFERRED], DART_RELEVANCE_HIGH); 452 assertSuggestKeywords([Keyword.AS, Keyword.DEFERRED], DART_RELEVANCE_HIGH);
453 } 453 }
454 454
455 test_import_deferred5() {
456 addTestSource('import "foo" d^');
457 expect(computeFast(), isTrue);
458 assertSuggestKeywords([Keyword.AS, Keyword.DEFERRED], DART_RELEVANCE_HIGH);
459 }
460
461 test_import_deferred6() {
462 addTestSource('import "foo" d^ import');
463 expect(computeFast(), isTrue);
464 assertSuggestKeywords([Keyword.AS, Keyword.DEFERRED], DART_RELEVANCE_HIGH);
465 }
466
455 test_import_deferred_not() { 467 test_import_deferred_not() {
456 addTestSource('import "foo" as foo ^;'); 468 addTestSource('import "foo" as foo ^;');
457 expect(computeFast(), isTrue); 469 expect(computeFast(), isTrue);
458 assertSuggestKeywords([], DART_RELEVANCE_HIGH); 470 assertSuggestKeywords([], DART_RELEVANCE_HIGH);
459 } 471 }
460 472
461 test_import_deferred_as() { 473 test_import_deferred_as() {
462 addTestSource('import "foo" ^;'); 474 addTestSource('import "foo" ^;');
463 expect(computeFast(), isTrue); 475 expect(computeFast(), isTrue);
464 assertSuggestKeywords([Keyword.AS, Keyword.DEFERRED], DART_RELEVANCE_HIGH); 476 assertSuggestKeywords([Keyword.AS, Keyword.DEFERRED], DART_RELEVANCE_HIGH);
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
534 sorted.forEach((k) => msg.writeln(' Keyword.${k.name},')); 546 sorted.forEach((k) => msg.writeln(' Keyword.${k.name},'));
535 } 547 }
536 548
537 bool _equalSets(Iterable<Keyword> iter1, Iterable<Keyword> iter2) { 549 bool _equalSets(Iterable<Keyword> iter1, Iterable<Keyword> iter2) {
538 if (iter1.length != iter2.length) return false; 550 if (iter1.length != iter2.length) return false;
539 if (iter1.any((k) => !iter2.contains(k))) return false; 551 if (iter1.any((k) => !iter2.contains(k))) return false;
540 if (iter2.any((k) => !iter1.contains(k))) return false; 552 if (iter2.any((k) => !iter1.contains(k))) return false;
541 return true; 553 return true;
542 } 554 }
543 } 555 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/test/services/completion/arglist_contributor_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698