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

Side by Side Diff: pkg/analysis_server/test/integration/completion/get_suggestions_test.dart

Issue 2564863003: Get all integration tests running with the new driver (Closed)
Patch Set: Created 4 years 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
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 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 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.integration.completion.get.suggestions;
6
7 import 'package:analysis_server/plugin/protocol/protocol.dart'; 5 import 'package:analysis_server/plugin/protocol/protocol.dart';
8 import 'package:test/test.dart'; 6 import 'package:test/test.dart';
9 import 'package:test_reflective_loader/test_reflective_loader.dart'; 7 import 'package:test_reflective_loader/test_reflective_loader.dart';
10 8
11 import '../integration_tests.dart'; 9 import '../integration_tests.dart';
12 10
13 main() { 11 main() {
14 defineReflectiveSuite(() { 12 defineReflectiveSuite(() {
15 defineReflectiveTests(Test); 13 defineReflectiveTests(GetSuggestionsTest);
14 defineReflectiveTests(GetSuggestionsTest_Driver);
16 }); 15 });
17 } 16 }
18 17
19 @reflectiveTest 18 class AbstractGetSuggestionsTest extends AbstractAnalysisServerIntegrationTest {
20 class Test extends AbstractAnalysisServerIntegrationTest {
21 String path; 19 String path;
22 String content; 20 String content;
23 int completionOffset; 21 int completionOffset;
24 22
25 void setTestSource(String relPath, String content) { 23 void setTestSource(String relPath, String content) {
26 path = sourcePath(relPath); 24 path = sourcePath(relPath);
27 expect(completionOffset, isNull, reason: 'Call addTestUnit exactly once'); 25 expect(completionOffset, isNull, reason: 'Call addTestUnit exactly once');
28 completionOffset = content.indexOf('^'); 26 completionOffset = content.indexOf('^');
29 expect(completionOffset, isNot(equals(-1)), reason: 'missing ^'); 27 expect(completionOffset, isNot(equals(-1)), reason: 'missing ^');
30 int nextOffset = content.indexOf('^', completionOffset + 1); 28 int nextOffset = content.indexOf('^', completionOffset + 1);
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 //sendAnalysisUpdateContent({path: new AddContentOverlay(content)}); 114 //sendAnalysisUpdateContent({path: new AddContentOverlay(content)});
117 var errorToken = 'exception from server'; 115 var errorToken = 'exception from server';
118 return sendCompletionGetSuggestions(path, 0).catchError((e) { 116 return sendCompletionGetSuggestions(path, 0).catchError((e) {
119 // Exception expected 117 // Exception expected
120 return errorToken; 118 return errorToken;
121 }).then((result) { 119 }).then((result) {
122 expect(result, same(errorToken)); 120 expect(result, same(errorToken));
123 }); 121 });
124 } 122 }
125 } 123 }
124
125 @reflectiveTest
126 class GetSuggestionsTest extends AbstractGetSuggestionsTest {}
127
128 @reflectiveTest
129 class GetSuggestionsTest_Driver extends AbstractGetSuggestionsTest {
130 @override
131 bool get enableNewAnalysisDriver => true;
132
133 @failingTest
134 test_getSuggestions_onlyOverlay() async {
135 // TimeoutException after 0:00:30.000000: Test timed out after 30 seconds.
136 //return super.test_getSuggestions_onlyOverlay();
137 fail('Test timed out');
138 }
139
140 @failingTest
141 test_getSuggestions_sourceMissing_noWait() {
142 // Expected: same instance as 'exception from server'
143 // Actual: CompletionGetSuggestionsResult:<{"id":"0"}>
144 return super.test_getSuggestions_sourceMissing_noWait();
145 }
146 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698