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

Side by Side Diff: pkg/analysis_server/test/services/completion/dart/type_member_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
« no previous file with comments | « pkg/analysis_server/test/services/completion/dart/local_reference_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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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.type_member; 5 library test.services.completion.contributor.dart.type_member;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:analysis_server/plugin/protocol/protocol.dart'; 9 import 'package:analysis_server/plugin/protocol/protocol.dart';
10 import 'package:analysis_server/src/provisional/completion/dart/completion_dart. dart'; 10 import 'package:analysis_server/src/provisional/completion/dart/completion_dart. dart';
(...skipping 4145 matching lines...) Expand 10 before | Expand all | Expand 10 after
4156 assertNotSuggested('f'); 4156 assertNotSuggested('f');
4157 assertNotSuggested('x'); 4157 assertNotSuggested('x');
4158 assertNotSuggested('e'); 4158 assertNotSuggested('e');
4159 } 4159 }
4160 } 4160 }
4161 4161
4162 @reflectiveTest 4162 @reflectiveTest
4163 class TypeMemberContributorTest_Driver extends TypeMemberContributorTest { 4163 class TypeMemberContributorTest_Driver extends TypeMemberContributorTest {
4164 @override 4164 @override
4165 bool get enableNewAnalysisDriver => true; 4165 bool get enableNewAnalysisDriver => true;
4166
4167 test_ArgDefaults_method() async {
4168 addTestSource('''
4169 class A {
4170 bool a(int b, bool c) => false;
4166 } 4171 }
4172
4173 void main() {new A().a^}''');
4174 await computeSuggestions();
4175
4176 assertSuggestMethod('a', 'A', 'bool', defaultArgListString: 'b, c');
4177 }
4178
4179 test_ArgDefaults_method_none() async {
4180 addTestSource('''
4181 class A {
4182 bool a() => false;
4183 }
4184
4185 void main() {new A().a^}''');
4186 await computeSuggestions();
4187
4188 assertSuggestMethod('a', 'A', 'bool', defaultArgListString: null);
4189 }
4190
4191 test_ArgDefaults_method_with_optional_positional() async {
4192 addMetaPackageSource();
4193 addTestSource('''
4194 import 'package:meta/meta.dart';
4195
4196 class A {
4197 bool foo(int bar, [bool boo, int baz]) => false;
4198 }
4199
4200 void main() {new A().f^}''');
4201 await computeSuggestions();
4202
4203 assertSuggestMethod('foo', 'A', 'bool', defaultArgListString: 'bar');
4204 }
4205
4206 test_ArgDefaults_method_with_required_named() async {
4207 addMetaPackageSource();
4208 addTestSource('''
4209 import 'package:meta/meta.dart';
4210
4211 class A {
4212 bool foo(int bar, {bool boo, @required int baz}) => false;
4213 }
4214
4215 void main() {new A().f^}''');
4216 await computeSuggestions();
4217
4218 assertSuggestMethod('foo', 'A', 'bool',
4219 defaultArgListString: 'bar, baz: null');
4220 }
4221 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/test/services/completion/dart/local_reference_contributor_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698