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

Unified Diff: pkg/analysis_services/test/completion/invocation_computer_test.dart

Issue 471143002: first incomplete cut at invocation/accessor suggestions (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merge Created 6 years, 4 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
Index: pkg/analysis_services/test/completion/invocation_computer_test.dart
diff --git a/pkg/analysis_services/test/completion/invocation_computer_test.dart b/pkg/analysis_services/test/completion/invocation_computer_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..610be2e83840031fd13007f8beda4819bd717cee
--- /dev/null
+++ b/pkg/analysis_services/test/completion/invocation_computer_test.dart
@@ -0,0 +1,55 @@
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library test.services.completion.invocation;
+
+
+import 'package:analysis_services/src/completion/invocation_computer.dart';
+import 'package:analysis_testing/reflective_tests.dart';
+import 'package:unittest/unittest.dart';
+
+import 'completion_test_util.dart';
+
+main() {
+ groupSep = ' | ';
+ runReflectiveTests(InvocationComputerTest);
+}
+
+@ReflectiveTestCase()
+class InvocationComputerTest extends AbstractCompletionTest {
+
+ @override
+ void setUp() {
+ super.setUp();
+ computer = new InvocationComputer();
+ }
+
+ test_field() {
+ addTestSource('class A {A b;} main() {A a; a.^}');
+ return computeFull().then((_) {
+ assertSuggestField('b');
+ });
+ }
+
+ test_getter() {
+ addTestSource('class A {A get b => new A();} main() {A a; a.^}');
+ return computeFull().then((_) {
+ assertSuggestGetter('b');
+ });
+ }
+
+ test_method() {
+ addTestSource('class A {b(X x) {}} main() {A a; a.^}');
+ return computeFull().then((_) {
+ assertSuggestMethod('b');
+ });
+ }
+
+ test_setter() {
+ addTestSource('class A {set b(X x) {}} main() {A a; a.^}');
+ return computeFull().then((_) {
+ assertSuggestSetter('b');
+ });
+ }
+}
« no previous file with comments | « pkg/analysis_services/test/completion/completion_test_util.dart ('k') | pkg/analysis_services/test/completion/test_all.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698