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

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

Issue 2616493004: Fix part related completion tests with the new analysis driver. (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « pkg/analysis_server/test/services/completion/dart/local_library_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.contributor.dart.importuri; 5 library test.services.completion.contributor.dart.importuri;
6 6
7 import 'package:analysis_server/plugin/protocol/protocol.dart'; 7 import 'package:analysis_server/plugin/protocol/protocol.dart';
8 import 'package:analysis_server/src/provisional/completion/dart/completion_dart. dart'; 8 import 'package:analysis_server/src/provisional/completion/dart/completion_dart. dart';
9 import 'package:analysis_server/src/services/completion/dart/uri_contributor.dar t'; 9 import 'package:analysis_server/src/services/completion/dart/uri_contributor.dar t';
10 import 'package:analyzer/file_system/memory_file_system.dart'; 10 import 'package:analyzer/file_system/memory_file_system.dart';
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 } 464 }
465 } 465 }
466 466
467 @reflectiveTest 467 @reflectiveTest
468 class UriContributorTest_Driver extends UriContributorTest { 468 class UriContributorTest_Driver extends UriContributorTest {
469 @override 469 @override
470 bool get enableNewAnalysisDriver => true; 470 bool get enableNewAnalysisDriver => true;
471 471
472 @failingTest 472 @failingTest
473 @override 473 @override
474 test_import_file() {
475 // expected other.dart CompletionSuggestionKind.IMPORT null
476 // found
477 // dart: -> {"kind":"IMPORT","relevance":1000,"completion":"dart:","selection Offset":5,"selectionLength":0,"isDeprecated":false,"isPotential":false}
478 // dart:async -> {"kind":"IMPORT","relevance":1000,"completion":"dart:async", "selectionOffset":10,"selectionLength":0,"isDeprecated":false,"isPotential":fals e}
479 // dart:collection -> {"kind":"IMPORT","relevance":1000,"completion":"dart:co llection","selectionOffset":15,"selectionLength":0,"isDeprecated":false,"isPoten tial":false}
480 // dart:convert -> {"kind":"IMPORT","relevance":1000,"completion":"dart:conve rt","selectionOffset":12,"selectionLength":0,"isDeprecated":false,"isPotential": false}
481 // dart:core -> {"kind":"IMPORT","relevance":500,"completion":"dart:core","se lectionOffset":9,"selectionLength":0,"isDeprecated":false,"isPotential":false}
482 // dart:html -> {"kind":"IMPORT","relevance":1000,"completion":"dart:html","s electionOffset":9,"selectionLength":0,"isDeprecated":false,"isPotential":false}
483 // dart:math -> {"kind":"IMPORT","relevance":1000,"completion":"dart:math","s electionOffset":9,"selectionLength":0,"isDeprecated":false,"isPotential":false}
484 // package: -> {"kind":"IMPORT","relevance":1000,"completion":"package:","sel ectionOffset":8,"selectionLength":0,"isDeprecated":false,"isPotential":false}
485 return super.test_import_file();
486 }
487
488 @failingTest
489 @override
490 test_import_file2() {
491 // expected other.dart CompletionSuggestionKind.IMPORT null
492 // found
493 // dart: -> {"kind":"IMPORT","relevance":1000,"completion":"dart:","selection Offset":5,"selectionLength":0,"isDeprecated":false,"isPotential":false}
494 // dart:async -> {"kind":"IMPORT","relevance":1000,"completion":"dart:async", "selectionOffset":10,"selectionLength":0,"isDeprecated":false,"isPotential":fals e}
495 // dart:collection -> {"kind":"IMPORT","relevance":1000,"completion":"dart:co llection","selectionOffset":15,"selectionLength":0,"isDeprecated":false,"isPoten tial":false}
496 // dart:convert -> {"kind":"IMPORT","relevance":1000,"completion":"dart:conve rt","selectionOffset":12,"selectionLength":0,"isDeprecated":false,"isPotential": false}
497 // dart:core -> {"kind":"IMPORT","relevance":500,"completion":"dart:core","se lectionOffset":9,"selectionLength":0,"isDeprecated":false,"isPotential":false}
498 // dart:html -> {"kind":"IMPORT","relevance":1000,"completion":"dart:html","s electionOffset":9,"selectionLength":0,"isDeprecated":false,"isPotential":false}
499 // dart:math -> {"kind":"IMPORT","relevance":1000,"completion":"dart:math","s electionOffset":9,"selectionLength":0,"isDeprecated":false,"isPotential":false}
500 // package: -> {"kind":"IMPORT","relevance":1000,"completion":"package:","sel ectionOffset":8,"selectionLength":0,"isDeprecated":false,"isPotential":false}
501 return super.test_import_file2();
502 }
503
504 @failingTest
505 @override
506 test_import_file_child() {
507 // expected foo/bar.dart CompletionSuggestionKind.IMPORT null
508 // found
509 // dart: -> {"kind":"IMPORT","relevance":1000,"completion":"dart:","selection Offset":5,"selectionLength":0,"isDeprecated":false,"isPotential":false}
510 // dart:async -> {"kind":"IMPORT","relevance":1000,"completion":"dart:async", "selectionOffset":10,"selectionLength":0,"isDeprecated":false,"isPotential":fals e}
511 // dart:collection -> {"kind":"IMPORT","relevance":1000,"completion":"dart:co llection","selectionOffset":15,"selectionLength":0,"isDeprecated":false,"isPoten tial":false}
512 // dart:convert -> {"kind":"IMPORT","relevance":1000,"completion":"dart:conve rt","selectionOffset":12,"selectionLength":0,"isDeprecated":false,"isPotential": false}
513 // dart:core -> {"kind":"IMPORT","relevance":500,"completion":"dart:core","se lectionOffset":9,"selectionLength":0,"isDeprecated":false,"isPotential":false}
514 // dart:html -> {"kind":"IMPORT","relevance":1000,"completion":"dart:html","s electionOffset":9,"selectionLength":0,"isDeprecated":false,"isPotential":false}
515 // dart:math -> {"kind":"IMPORT","relevance":1000,"completion":"dart:math","s electionOffset":9,"selectionLength":0,"isDeprecated":false,"isPotential":false}
516 // package: -> {"kind":"IMPORT","relevance":1000,"completion":"package:","sel ectionOffset":8,"selectionLength":0,"isDeprecated":false,"isPotential":false}
517 return super.test_import_file_child();
518 }
519
520 @failingTest
521 @override
522 test_import_file_parent() {
523 // expected ../blat.dart CompletionSuggestionKind.IMPORT null
524 // found
525 // dart: -> {"kind":"IMPORT","relevance":1000,"completion":"dart:","selection Offset":5,"selectionLength":0,"isDeprecated":false,"isPotential":false}
526 // dart:async -> {"kind":"IMPORT","relevance":1000,"completion":"dart:async", "selectionOffset":10,"selectionLength":0,"isDeprecated":false,"isPotential":fals e}
527 // dart:collection -> {"kind":"IMPORT","relevance":1000,"completion":"dart:co llection","selectionOffset":15,"selectionLength":0,"isDeprecated":false,"isPoten tial":false}
528 // dart:convert -> {"kind":"IMPORT","relevance":1000,"completion":"dart:conve rt","selectionOffset":12,"selectionLength":0,"isDeprecated":false,"isPotential": false}
529 // dart:core -> {"kind":"IMPORT","relevance":500,"completion":"dart:core","se lectionOffset":9,"selectionLength":0,"isDeprecated":false,"isPotential":false}
530 // dart:html -> {"kind":"IMPORT","relevance":1000,"completion":"dart:html","s electionOffset":9,"selectionLength":0,"isDeprecated":false,"isPotential":false}
531 // dart:math -> {"kind":"IMPORT","relevance":1000,"completion":"dart:math","s electionOffset":9,"selectionLength":0,"isDeprecated":false,"isPotential":false}
532 // package: -> {"kind":"IMPORT","relevance":1000,"completion":"package:","sel ectionOffset":8,"selectionLength":0,"isDeprecated":false,"isPotential":false}
533 return super.test_import_file_parent();
534 }
535
536 @failingTest
537 @override
538 test_import_file_parent2() {
539 // expected ../blat.dart CompletionSuggestionKind.IMPORT null
540 // found
541 // dart: -> {"kind":"IMPORT","relevance":1000,"completion":"dart:","selection Offset":5,"selectionLength":0,"isDeprecated":false,"isPotential":false}
542 // dart:async -> {"kind":"IMPORT","relevance":1000,"completion":"dart:async", "selectionOffset":10,"selectionLength":0,"isDeprecated":false,"isPotential":fals e}
543 // dart:collection -> {"kind":"IMPORT","relevance":1000,"completion":"dart:co llection","selectionOffset":15,"selectionLength":0,"isDeprecated":false,"isPoten tial":false}
544 // dart:convert -> {"kind":"IMPORT","relevance":1000,"completion":"dart:conve rt","selectionOffset":12,"selectionLength":0,"isDeprecated":false,"isPotential": false}
545 // dart:core -> {"kind":"IMPORT","relevance":500,"completion":"dart:core","se lectionOffset":9,"selectionLength":0,"isDeprecated":false,"isPotential":false}
546 // dart:html -> {"kind":"IMPORT","relevance":1000,"completion":"dart:html","s electionOffset":9,"selectionLength":0,"isDeprecated":false,"isPotential":false}
547 // dart:math -> {"kind":"IMPORT","relevance":1000,"completion":"dart:math","s electionOffset":9,"selectionLength":0,"isDeprecated":false,"isPotential":false}
548 // package: -> {"kind":"IMPORT","relevance":1000,"completion":"package:","sel ectionOffset":8,"selectionLength":0,"isDeprecated":false,"isPotential":false}
549 return super.test_import_file_parent2();
550 }
551
552 @failingTest
553 @override
554 test_part_file() { 474 test_part_file() {
555 // NoSuchMethodError: The getter 'uri' was called on null. 475 // NoSuchMethodError: The getter 'uri' was called on null.
556 // Receiver: null 476 // Receiver: null
557 // Tried calling: uri 477 // Tried calling: uri
558 // dart:core Object.noS uchMethod 478 // dart:core Object.noS uchMethod
559 // package:analyzer/src/summary/resynthesize.dart 233:40 SummaryRes ynthesizer.getLibraryElement.<fn> 479 // package:analyzer/src/summary/resynthesize.dart 233:40 SummaryRes ynthesizer.getLibraryElement.<fn>
560 // dart:collection _HashVMBas e&MapMixin&&_LinkedHashMapMixin.putIfAbsent 480 // dart:collection _HashVMBas e&MapMixin&&_LinkedHashMapMixin.putIfAbsent
561 // package:analyzer/src/summary/resynthesize.dart 209:36 SummaryRes ynthesizer.getLibraryElement 481 // package:analyzer/src/summary/resynthesize.dart 209:36 SummaryRes ynthesizer.getLibraryElement
562 // package:analyzer/src/summary/package_bundle_reader.dart 206:27 Resynthesi zerResultProvider.compute 482 // package:analyzer/src/summary/package_bundle_reader.dart 206:27 Resynthesi zerResultProvider.compute
563 // package:analyzer/src/context/context.dart 573:52 AnalysisCo ntextImpl.aboutToComputeResult.<fn> 483 // package:analyzer/src/context/context.dart 573:52 AnalysisCo ntextImpl.aboutToComputeResult.<fn>
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
827 } 747 }
828 } 748 }
829 749
830 @reflectiveTest 750 @reflectiveTest
831 class UriContributorWindowsTest_Driver extends UriContributorWindowsTest { 751 class UriContributorWindowsTest_Driver extends UriContributorWindowsTest {
832 @override 752 @override
833 bool get enableNewAnalysisDriver => true; 753 bool get enableNewAnalysisDriver => true;
834 754
835 @failingTest 755 @failingTest
836 @override 756 @override
837 test_import_file() {
838 // expected other.dart CompletionSuggestionKind.IMPORT null
839 // found
840 // dart: -> {"kind":"IMPORT","relevance":1000,"completion":"dart:","selection Offset":5,"selectionLength":0,"isDeprecated":false,"isPotential":false}
841 // dart:async -> {"kind":"IMPORT","relevance":1000,"completion":"dart:async", "selectionOffset":10,"selectionLength":0,"isDeprecated":false,"isPotential":fals e}
842 // dart:collection -> {"kind":"IMPORT","relevance":1000,"completion":"dart:co llection","selectionOffset":15,"selectionLength":0,"isDeprecated":false,"isPoten tial":false}
843 // dart:convert -> {"kind":"IMPORT","relevance":1000,"completion":"dart:conve rt","selectionOffset":12,"selectionLength":0,"isDeprecated":false,"isPotential": false}
844 // dart:core -> {"kind":"IMPORT","relevance":500,"completion":"dart:core","se lectionOffset":9,"selectionLength":0,"isDeprecated":false,"isPotential":false}
845 // dart:html -> {"kind":"IMPORT","relevance":1000,"completion":"dart:html","s electionOffset":9,"selectionLength":0,"isDeprecated":false,"isPotential":false}
846 // dart:math -> {"kind":"IMPORT","relevance":1000,"completion":"dart:math","s electionOffset":9,"selectionLength":0,"isDeprecated":false,"isPotential":false}
847 // package: -> {"kind":"IMPORT","relevance":1000,"completion":"package:","sel ectionOffset":8,"selectionLength":0,"isDeprecated":false,"isPotential":false}
848 return super.test_import_file();
849 }
850
851 @failingTest
852 @override
853 test_import_file2() {
854 // expected other.dart CompletionSuggestionKind.IMPORT null
855 // found
856 // dart: -> {"kind":"IMPORT","relevance":1000,"completion":"dart:","selection Offset":5,"selectionLength":0,"isDeprecated":false,"isPotential":false}
857 // dart:async -> {"kind":"IMPORT","relevance":1000,"completion":"dart:async", "selectionOffset":10,"selectionLength":0,"isDeprecated":false,"isPotential":fals e}
858 // dart:collection -> {"kind":"IMPORT","relevance":1000,"completion":"dart:co llection","selectionOffset":15,"selectionLength":0,"isDeprecated":false,"isPoten tial":false}
859 // dart:convert -> {"kind":"IMPORT","relevance":1000,"completion":"dart:conve rt","selectionOffset":12,"selectionLength":0,"isDeprecated":false,"isPotential": false}
860 // dart:core -> {"kind":"IMPORT","relevance":500,"completion":"dart:core","se lectionOffset":9,"selectionLength":0,"isDeprecated":false,"isPotential":false}
861 // dart:html -> {"kind":"IMPORT","relevance":1000,"completion":"dart:html","s electionOffset":9,"selectionLength":0,"isDeprecated":false,"isPotential":false}
862 // dart:math -> {"kind":"IMPORT","relevance":1000,"completion":"dart:math","s electionOffset":9,"selectionLength":0,"isDeprecated":false,"isPotential":false}
863 // package: -> {"kind":"IMPORT","relevance":1000,"completion":"package:","sel ectionOffset":8,"selectionLength":0,"isDeprecated":false,"isPotential":false}
864 return super.test_import_file2();
865 }
866
867 @failingTest
868 @override
869 test_import_file_child() {
870 // expected foo/bar.dart CompletionSuggestionKind.IMPORT null
871 // found
872 // dart: -> {"kind":"IMPORT","relevance":1000,"completion":"dart:","selection Offset":5,"selectionLength":0,"isDeprecated":false,"isPotential":false}
873 // dart:async -> {"kind":"IMPORT","relevance":1000,"completion":"dart:async", "selectionOffset":10,"selectionLength":0,"isDeprecated":false,"isPotential":fals e}
874 // dart:collection -> {"kind":"IMPORT","relevance":1000,"completion":"dart:co llection","selectionOffset":15,"selectionLength":0,"isDeprecated":false,"isPoten tial":false}
875 // dart:convert -> {"kind":"IMPORT","relevance":1000,"completion":"dart:conve rt","selectionOffset":12,"selectionLength":0,"isDeprecated":false,"isPotential": false}
876 // dart:core -> {"kind":"IMPORT","relevance":500,"completion":"dart:core","se lectionOffset":9,"selectionLength":0,"isDeprecated":false,"isPotential":false}
877 // dart:html -> {"kind":"IMPORT","relevance":1000,"completion":"dart:html","s electionOffset":9,"selectionLength":0,"isDeprecated":false,"isPotential":false}
878 // dart:math -> {"kind":"IMPORT","relevance":1000,"completion":"dart:math","s electionOffset":9,"selectionLength":0,"isDeprecated":false,"isPotential":false}
879 // package: -> {"kind":"IMPORT","relevance":1000,"completion":"package:","sel ectionOffset":8,"selectionLength":0,"isDeprecated":false,"isPotential":false}
880 return super.test_import_file_child();
881 }
882
883 @failingTest
884 @override
885 test_import_file_parent() {
886 // expected ../blat.dart CompletionSuggestionKind.IMPORT null
887 // found
888 // dart: -> {"kind":"IMPORT","relevance":1000,"completion":"dart:","selection Offset":5,"selectionLength":0,"isDeprecated":false,"isPotential":false}
889 // dart:async -> {"kind":"IMPORT","relevance":1000,"completion":"dart:async", "selectionOffset":10,"selectionLength":0,"isDeprecated":false,"isPotential":fals e}
890 // dart:collection -> {"kind":"IMPORT","relevance":1000,"completion":"dart:co llection","selectionOffset":15,"selectionLength":0,"isDeprecated":false,"isPoten tial":false}
891 // dart:convert -> {"kind":"IMPORT","relevance":1000,"completion":"dart:conve rt","selectionOffset":12,"selectionLength":0,"isDeprecated":false,"isPotential": false}
892 // dart:core -> {"kind":"IMPORT","relevance":500,"completion":"dart:core","se lectionOffset":9,"selectionLength":0,"isDeprecated":false,"isPotential":false}
893 // dart:html -> {"kind":"IMPORT","relevance":1000,"completion":"dart:html","s electionOffset":9,"selectionLength":0,"isDeprecated":false,"isPotential":false}
894 // dart:math -> {"kind":"IMPORT","relevance":1000,"completion":"dart:math","s electionOffset":9,"selectionLength":0,"isDeprecated":false,"isPotential":false}
895 // package: -> {"kind":"IMPORT","relevance":1000,"completion":"package:","sel ectionOffset":8,"selectionLength":0,"isDeprecated":false,"isPotential":false}
896 return super.test_import_file_parent();
897 }
898
899 @failingTest
900 @override
901 test_import_file_parent2() {
902 // expected ../blat.dart CompletionSuggestionKind.IMPORT null
903 // found
904 // dart: -> {"kind":"IMPORT","relevance":1000,"completion":"dart:","selection Offset":5,"selectionLength":0,"isDeprecated":false,"isPotential":false}
905 // dart:async -> {"kind":"IMPORT","relevance":1000,"completion":"dart:async", "selectionOffset":10,"selectionLength":0,"isDeprecated":false,"isPotential":fals e}
906 // dart:collection -> {"kind":"IMPORT","relevance":1000,"completion":"dart:co llection","selectionOffset":15,"selectionLength":0,"isDeprecated":false,"isPoten tial":false}
907 // dart:convert -> {"kind":"IMPORT","relevance":1000,"completion":"dart:conve rt","selectionOffset":12,"selectionLength":0,"isDeprecated":false,"isPotential": false}
908 // dart:core -> {"kind":"IMPORT","relevance":500,"completion":"dart:core","se lectionOffset":9,"selectionLength":0,"isDeprecated":false,"isPotential":false}
909 // dart:html -> {"kind":"IMPORT","relevance":1000,"completion":"dart:html","s electionOffset":9,"selectionLength":0,"isDeprecated":false,"isPotential":false}
910 // dart:math -> {"kind":"IMPORT","relevance":1000,"completion":"dart:math","s electionOffset":9,"selectionLength":0,"isDeprecated":false,"isPotential":false}
911 // package: -> {"kind":"IMPORT","relevance":1000,"completion":"package:","sel ectionOffset":8,"selectionLength":0,"isDeprecated":false,"isPotential":false}
912 return super.test_import_file_parent2();
913 }
914
915 @failingTest
916 @override
917 test_part_file() { 757 test_part_file() {
918 // NoSuchMethodError: The getter 'uri' was called on null. 758 // NoSuchMethodError: The getter 'uri' was called on null.
919 // Receiver: null 759 // Receiver: null
920 // Tried calling: uri 760 // Tried calling: uri
921 // dart:core Object.noS uchMethod 761 // dart:core Object.noS uchMethod
922 // package:analyzer/src/summary/resynthesize.dart 233:40 SummaryRes ynthesizer.getLibraryElement.<fn> 762 // package:analyzer/src/summary/resynthesize.dart 233:40 SummaryRes ynthesizer.getLibraryElement.<fn>
923 // dart:collection _HashVMBas e&MapMixin&&_LinkedHashMapMixin.putIfAbsent 763 // dart:collection _HashVMBas e&MapMixin&&_LinkedHashMapMixin.putIfAbsent
924 // package:analyzer/src/summary/resynthesize.dart 209:36 SummaryRes ynthesizer.getLibraryElement 764 // package:analyzer/src/summary/resynthesize.dart 209:36 SummaryRes ynthesizer.getLibraryElement
925 // package:analyzer/src/summary/package_bundle_reader.dart 206:27 Resynthesi zerResultProvider.compute 765 // package:analyzer/src/summary/package_bundle_reader.dart 206:27 Resynthesi zerResultProvider.compute
926 // package:analyzer/src/context/context.dart 573:52 AnalysisCo ntextImpl.aboutToComputeResult.<fn> 766 // package:analyzer/src/context/context.dart 573:52 AnalysisCo ntextImpl.aboutToComputeResult.<fn>
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
1021 // expected foo/bar.dart CompletionSuggestionKind.IMPORT null 861 // expected foo/bar.dart CompletionSuggestionKind.IMPORT null
1022 // found 862 // found
1023 return super.test_part_file_parent(); 863 return super.test_part_file_parent();
1024 } 864 }
1025 } 865 }
1026 866
1027 class _TestWinResourceProvider extends MemoryResourceProvider { 867 class _TestWinResourceProvider extends MemoryResourceProvider {
1028 @override 868 @override
1029 Context get pathContext => windows; 869 Context get pathContext => windows;
1030 } 870 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/test/services/completion/dart/local_library_contributor_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698