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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | pkg/analysis_server/test/integration/test_all.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 library test.integration.completion.domain;
6
7 import 'dart:async';
8
9 import 'package:analysis_server/src/constants.dart';
10 import 'package:analysis_testing/reflective_tests.dart';
11 import 'package:unittest/unittest.dart';
12
13 import 'integration_tests.dart';
14
15 @ReflectiveTestCase()
16 class CompletionDomainIntegrationTest extends
17 AbstractAnalysisServerIntegrationTest {
18 fail_test_getSuggestions_string_var() {
19 // See dartbug.com/20188
20 String filename = 'test.dart';
21 String pathname = normalizePath(filename);
22 String text =
23 r'''
24 var test = '';
25 main() {
26 test.
27 }
28 ''';
29 writeFile(filename, text);
30 setAnalysisRoots(['']);
31
32 return analysisFinished.then((_) {
33 return server.send(COMPLETION_GET_SUGGESTIONS, {
34 'file': pathname,
35 'offset': text.indexOf('test.') + 'test.'.length
36 }).then((result) {
37 // Since the feature doesn't work yet, just pause for a second to
38 // collect the output of the analysis server, and then stop the test.
39 // TODO(paulberry): finish writing the integration test once the feature
40 // it more complete.
41 return new Future.delayed(new Duration(seconds: 1), () {
42 fail('test not completed yet');
43 });
44 });
45 });
46 }
47 }
48
49 main() {
50 runReflectiveTests(CompletionDomainIntegrationTest);
51 }
OLDNEW
« 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