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

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

Issue 2728653004: Default arg support continued (flutter-intellij#553). (Closed)
Patch Set: Review tweaks. Created 3 years, 9 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
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.inherited_ref; 5 library test.services.completion.contributor.dart.inherited_ref;
6 6
7 import 'package:analysis_server/src/protocol_server.dart'; 7 import 'package:analysis_server/src/protocol_server.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/inherited_reference _contributor.dart'; 9 import 'package:analysis_server/src/services/completion/dart/inherited_reference _contributor.dart';
10 import 'package:test/test.dart'; 10 import 'package:test/test.dart';
(...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after
616 assertNotSuggested('y1'); 616 assertNotSuggested('y1');
617 assertNotSuggested('x2'); 617 assertNotSuggested('x2');
618 assertNotSuggested('y2'); 618 assertNotSuggested('y2');
619 } 619 }
620 } 620 }
621 621
622 @reflectiveTest 622 @reflectiveTest
623 class InheritedContributorTest_Driver extends InheritedContributorTest { 623 class InheritedContributorTest_Driver extends InheritedContributorTest {
624 @override 624 @override
625 bool get enableNewAnalysisDriver => true; 625 bool get enableNewAnalysisDriver => true;
626
627 /// Sanity check. Permutations tested in local_ref_contributor.
628 test_ArgDefaults_inherited_method_with_required_named() async {
629 addMetaPackageSource();
630 resolveSource(
631 '/testB.dart',
632 '''
633 import 'package:meta/meta.dart';
634
635 lib libB;
636 class A {
637 bool foo(int bar, {bool boo, @required int baz}) => false;
638 }''');
639 addTestSource('''
640 import "/testB.dart";
641 class B extends A {
642 b() => f^
626 } 643 }
644 ''');
645 await computeSuggestions();
646
647 assertSuggestMethod('foo', 'A', 'bool',
648 defaultArgListString: 'bar, baz: null');
649 }
650 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698