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

Unified Diff: pkg/analysis_server/test/services/completion/local_computer_test.dart

Issue 1006593002: include constructor arguments in completion suggestions (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merge Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analysis_server/test/completion_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/test/services/completion/local_computer_test.dart
diff --git a/pkg/analysis_server/test/services/completion/local_computer_test.dart b/pkg/analysis_server/test/services/completion/local_computer_test.dart
index 05182d300b4e03b50989c835f110e2fd714adbdd..d6f49b34d8f7e168fa1d4af7a914c3a25bc9b353 100644
--- a/pkg/analysis_server/test/services/completion/local_computer_test.dart
+++ b/pkg/analysis_server/test/services/completion/local_computer_test.dart
@@ -225,6 +225,41 @@ void main() {
assertSuggestLabel('bar');
}
+ test_constructor_parameters_mixed_required_and_named() {
+ addTestSource('class A {A(x, {int y}) {^}}');
+ expect(computeFast(), isTrue);
+ assertSuggestParameter('x', null);
+ assertSuggestParameter('y', 'int');
+ }
+
+ test_constructor_parameters_mixed_required_and_positional() {
+ addTestSource('class A {A(x, [int y]) {^}}');
+ expect(computeFast(), isTrue);
+ assertSuggestParameter('x', null);
+ assertSuggestParameter('y', 'int');
+ }
+
+ test_constructor_parameters_named() {
+ addTestSource('class A {A({x, int y}) {^}}');
+ expect(computeFast(), isTrue);
+ assertSuggestParameter('x', null);
+ assertSuggestParameter('y', 'int');
+ }
+
+ test_constructor_parameters_positional() {
+ addTestSource('class A {A([x, int y]) {^}}');
+ expect(computeFast(), isTrue);
+ assertSuggestParameter('x', null);
+ assertSuggestParameter('y', 'int');
+ }
+
+ test_constructor_parameters_required() {
+ addTestSource('class A {A(x, int y) {^}}');
+ expect(computeFast(), isTrue);
+ assertSuggestParameter('x', null);
+ assertSuggestParameter('y', 'int');
+ }
+
test_continue_from_loop_to_switch() {
addTestSource('''
void main() {
« no previous file with comments | « pkg/analysis_server/test/completion_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698