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

Side by Side Diff: pkg/analysis_server/test/services/index/index_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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 import 'package:analysis_server/src/services/index/index.dart'; 5 import 'package:analysis_server/src/services/index/index.dart';
6 import 'package:analyzer/dart/ast/ast.dart'; 6 import 'package:analyzer/dart/ast/ast.dart';
7 import 'package:analyzer/dart/element/element.dart'; 7 import 'package:analyzer/dart/element/element.dart';
8 import 'package:analyzer/src/generated/source.dart'; 8 import 'package:analyzer/src/generated/source.dart';
9 import 'package:analyzer/src/summary/idl.dart'; 9 import 'package:analyzer/src/summary/idl.dart';
10 import 'package:test/test.dart';
10 import 'package:test_reflective_loader/test_reflective_loader.dart'; 11 import 'package:test_reflective_loader/test_reflective_loader.dart';
11 import 'package:typed_mock/typed_mock.dart'; 12 import 'package:typed_mock/typed_mock.dart';
12 import 'package:unittest/unittest.dart';
13 13
14 import '../../abstract_single_unit.dart'; 14 import '../../abstract_single_unit.dart';
15 import '../../utils.dart'; 15 import '../../utils.dart';
16 16
17 main() { 17 main() {
18 initializeTestEnvironment(); 18 initializeTestEnvironment();
19 defineReflectiveTests(IndexTest); 19 defineReflectiveSuite(() {
20 defineReflectiveTests(IndexTest);
21 });
20 } 22 }
21 23
22 @reflectiveTest 24 @reflectiveTest
23 class IndexTest extends AbstractSingleUnitTest { 25 class IndexTest extends AbstractSingleUnitTest {
24 Index index = createMemoryIndex(); 26 Index index = createMemoryIndex();
25 27
26 /** 28 /**
27 * Return the [Location] with given properties, or fail. 29 * Return the [Location] with given properties, or fail.
28 */ 30 */
29 Location findLocation(List<Location> locations, String libraryUri, 31 Location findLocation(List<Location> locations, String libraryUri,
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 Source _indexUnit(String path, String code) { 370 Source _indexUnit(String path, String code) {
369 Source source = addSource(path, code); 371 Source source = addSource(path, code);
370 CompilationUnit unit = resolveLibraryUnit(source); 372 CompilationUnit unit = resolveLibraryUnit(source);
371 index.indexUnit(unit); 373 index.indexUnit(unit);
372 return source; 374 return source;
373 } 375 }
374 } 376 }
375 377
376 class _CompilationUnitElementMock extends TypedMock 378 class _CompilationUnitElementMock extends TypedMock
377 implements CompilationUnitElement {} 379 implements CompilationUnitElement {}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698