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

Side by Side Diff: pkg/analysis_server/test/analysis/navigation_collector_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.analysis.navigation_collector; 5 library test.analysis.navigation_collector;
6 6
7 import 'package:analysis_server/plugin/protocol/protocol.dart'; 7 import 'package:analysis_server/plugin/protocol/protocol.dart';
8 import 'package:analysis_server/src/domains/analysis/navigation.dart'; 8 import 'package:analysis_server/src/domains/analysis/navigation.dart';
9 import 'package:test/test.dart';
9 import 'package:test_reflective_loader/test_reflective_loader.dart'; 10 import 'package:test_reflective_loader/test_reflective_loader.dart';
10 import 'package:unittest/unittest.dart';
11 11
12 import '../utils.dart'; 12 import '../utils.dart';
13 13
14 main() { 14 main() {
15 initializeTestEnvironment(); 15 initializeTestEnvironment();
16 defineReflectiveTests(NavigationCollectorImplTest); 16 defineReflectiveSuite(() {
17 defineReflectiveTests(NavigationCollectorImplTest);
18 });
17 } 19 }
18 20
19 @reflectiveTest 21 @reflectiveTest
20 class NavigationCollectorImplTest { 22 class NavigationCollectorImplTest {
21 NavigationCollectorImpl collector = new NavigationCollectorImpl(); 23 NavigationCollectorImpl collector = new NavigationCollectorImpl();
22 24
23 void test_multipleTargets() { 25 void test_multipleTargets() {
24 collector.addRegion( 26 collector.addRegion(
25 10, 5, ElementKind.CLASS, new Location('file', 11, 12, 13, 14)); 27 10, 5, ElementKind.CLASS, new Location('file', 11, 12, 13, 14));
26 collector.addRegion( 28 collector.addRegion(
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 expect(region.length, 20); 73 expect(region.length, 20);
72 expect(region.targets, hasLength(1)); 74 expect(region.targets, hasLength(1));
73 { 75 {
74 NavigationTarget target = collector.targets[region.targets[0]]; 76 NavigationTarget target = collector.targets[region.targets[0]];
75 expect(target.offset, 21); 77 expect(target.offset, 21);
76 expect(target.length, 22); 78 expect(target.length, 22);
77 } 79 }
78 } 80 }
79 } 81 }
80 } 82 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698