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

Unified Diff: pkg/analysis_server/test/integration/completion_domain_inttest.dart

Issue 412323002: Start writing analysis server integration test for 'completion.getSuggestions'. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 5 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 | « no previous file | pkg/analysis_server/test/integration/test_all.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/test/integration/completion_domain_inttest.dart
diff --git a/pkg/analysis_server/test/integration/completion_domain_inttest.dart b/pkg/analysis_server/test/integration/completion_domain_inttest.dart
new file mode 100644
index 0000000000000000000000000000000000000000..574d390c019faa8481d0f1715c920438c59fe169
--- /dev/null
+++ b/pkg/analysis_server/test/integration/completion_domain_inttest.dart
@@ -0,0 +1,51 @@
+// 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.integration.completion.domain;
+
+import 'dart:async';
+
+import 'package:analysis_server/src/constants.dart';
+import 'package:analysis_testing/reflective_tests.dart';
+import 'package:unittest/unittest.dart';
+
+import 'integration_tests.dart';
+
+@ReflectiveTestCase()
+class CompletionDomainIntegrationTest extends
+ AbstractAnalysisServerIntegrationTest {
+ fail_test_getSuggestions_string_var() {
+ // See dartbug.com/20188
+ String filename = 'test.dart';
+ String pathname = normalizePath(filename);
+ String text =
+ r'''
+var test = '';
+main() {
+ test.
+}
+''';
+ writeFile(filename, text);
+ setAnalysisRoots(['']);
+
+ return analysisFinished.then((_) {
+ return server.send(COMPLETION_GET_SUGGESTIONS, {
+ 'file': pathname,
+ 'offset': text.indexOf('test.') + 'test.'.length
+ }).then((result) {
+ // Since the feature doesn't work yet, just pause for a second to
+ // collect the output of the analysis server, and then stop the test.
+ // TODO(paulberry): finish writing the integration test once the feature
+ // it more complete.
+ return new Future.delayed(new Duration(seconds: 1), () {
+ fail('test not completed yet');
+ });
+ });
+ });
+ }
+}
+
+main() {
+ runReflectiveTests(CompletionDomainIntegrationTest);
+}
« no previous file with comments | « no previous file | pkg/analysis_server/test/integration/test_all.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698