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

Side by Side Diff: pkg/analysis_server/test/services/completion/dart/label_contributor_test.dart

Issue 2572203002: Add completion tests for the new analysis 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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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.services.completion.contributor.dart.label; 5 library test.services.completion.contributor.dart.label;
6 6
7 import 'package:analysis_server/plugin/protocol/protocol.dart' as protocol 7 import 'package:analysis_server/plugin/protocol/protocol.dart' as protocol
8 show Element, ElementKind; 8 show Element, ElementKind;
9 import 'package:analysis_server/plugin/protocol/protocol.dart' 9 import 'package:analysis_server/plugin/protocol/protocol.dart'
10 hide Element, ElementKind; 10 hide Element, ElementKind;
11 import 'package:analysis_server/src/protocol_server.dart'; 11 import 'package:analysis_server/src/protocol_server.dart';
12 import 'package:analysis_server/src/provisional/completion/dart/completion_dart. dart'; 12 import 'package:analysis_server/src/provisional/completion/dart/completion_dart. dart';
13 import 'package:analysis_server/src/services/completion/dart/label_contributor.d art'; 13 import 'package:analysis_server/src/services/completion/dart/label_contributor.d art';
14 import 'package:test/test.dart'; 14 import 'package:test/test.dart';
15 import 'package:test_reflective_loader/test_reflective_loader.dart'; 15 import 'package:test_reflective_loader/test_reflective_loader.dart';
16 16
17 import 'completion_contributor_util.dart'; 17 import 'completion_contributor_util.dart';
18 18
19 main() { 19 main() {
20 defineReflectiveSuite(() { 20 defineReflectiveSuite(() {
21 defineReflectiveTests(LabelContributorTest); 21 defineReflectiveTests(LabelContributorTest);
22 defineReflectiveTests(LabelContributorTest_Driver);
22 }); 23 });
23 } 24 }
24 25
25 @reflectiveTest 26 @reflectiveTest
26 class LabelContributorTest extends DartCompletionContributorTest { 27 class LabelContributorTest extends DartCompletionContributorTest {
27 CompletionSuggestion assertSuggestLabel(String name, 28 CompletionSuggestion assertSuggestLabel(String name,
28 {int relevance: DART_RELEVANCE_DEFAULT, 29 {int relevance: DART_RELEVANCE_DEFAULT,
29 CompletionSuggestionKind kind: CompletionSuggestionKind.IDENTIFIER}) { 30 CompletionSuggestionKind kind: CompletionSuggestionKind.IDENTIFIER}) {
30 CompletionSuggestion cs = 31 CompletionSuggestion cs =
31 assertSuggest(name, csKind: kind, relevance: relevance); 32 assertSuggest(name, csKind: kind, relevance: relevance);
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 break; 318 break;
318 foo: case 2: 319 foo: case 2:
319 continue ^; 320 continue ^;
320 case 3: 321 case 3:
321 break; 322 break;
322 '''); 323 ''');
323 await computeSuggestions(); 324 await computeSuggestions();
324 assertSuggestLabel('foo'); 325 assertSuggestLabel('foo');
325 } 326 }
326 } 327 }
328
329 @reflectiveTest
330 class LabelContributorTest_Driver extends LabelContributorTest {
331 @override
332 bool get enableNewAnalysisDriver => true;
333 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698