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

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

Issue 2394683006: Switch analysis_server to use 'package:test'. (Closed)
Patch Set: Created 4 years, 2 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
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_reflective_loader/test_reflective_loader.dart'; 15 import 'package:test_reflective_loader/test_reflective_loader.dart';
15 import 'package:unittest/unittest.dart';
16 16
17 import '../../../utils.dart'; 17 import '../../../utils.dart';
18 import 'completion_contributor_util.dart'; 18 import 'completion_contributor_util.dart';
19 19
20 main() { 20 main() {
21 initializeTestEnvironment(); 21 initializeTestEnvironment();
22 defineReflectiveTests(LabelContributorTest); 22 defineReflectiveSuite(() {
23 defineReflectiveTests(LabelContributorTest);
24 });
23 } 25 }
24 26
25 @reflectiveTest 27 @reflectiveTest
26 class LabelContributorTest extends DartCompletionContributorTest { 28 class LabelContributorTest extends DartCompletionContributorTest {
27 CompletionSuggestion assertSuggestLabel(String name, 29 CompletionSuggestion assertSuggestLabel(String name,
28 {int relevance: DART_RELEVANCE_DEFAULT, 30 {int relevance: DART_RELEVANCE_DEFAULT,
29 CompletionSuggestionKind kind: CompletionSuggestionKind.IDENTIFIER}) { 31 CompletionSuggestionKind kind: CompletionSuggestionKind.IDENTIFIER}) {
30 CompletionSuggestion cs = 32 CompletionSuggestion cs =
31 assertSuggest(name, csKind: kind, relevance: relevance); 33 assertSuggest(name, csKind: kind, relevance: relevance);
32 expect(cs.returnType, isNull); 34 expect(cs.returnType, isNull);
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 break; 319 break;
318 foo: case 2: 320 foo: case 2:
319 continue ^; 321 continue ^;
320 case 3: 322 case 3:
321 break; 323 break;
322 '''); 324 ''');
323 await computeSuggestions(); 325 await computeSuggestions();
324 assertSuggestLabel('foo'); 326 assertSuggestLabel('foo');
325 } 327 }
326 } 328 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698