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

Side by Side Diff: pkg/analysis_server/test/analysis_server_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) 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.analysis_server; 5 library test.analysis_server;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:analysis_server/plugin/protocol/protocol.dart'; 9 import 'package:analysis_server/plugin/protocol/protocol.dart';
10 import 'package:analysis_server/src/analysis_server.dart'; 10 import 'package:analysis_server/src/analysis_server.dart';
11 import 'package:analysis_server/src/constants.dart'; 11 import 'package:analysis_server/src/constants.dart';
12 import 'package:analysis_server/src/context_manager.dart'; 12 import 'package:analysis_server/src/context_manager.dart';
13 import 'package:analysis_server/src/domain_server.dart'; 13 import 'package:analysis_server/src/domain_server.dart';
14 import 'package:analysis_server/src/operation/operation.dart'; 14 import 'package:analysis_server/src/operation/operation.dart';
15 import 'package:analysis_server/src/plugin/server_plugin.dart'; 15 import 'package:analysis_server/src/plugin/server_plugin.dart';
16 import 'package:analyzer/exception/exception.dart'; 16 import 'package:analyzer/exception/exception.dart';
17 import 'package:analyzer/file_system/file_system.dart'; 17 import 'package:analyzer/file_system/file_system.dart';
18 import 'package:analyzer/file_system/memory_file_system.dart'; 18 import 'package:analyzer/file_system/memory_file_system.dart';
19 import 'package:analyzer/instrumentation/instrumentation.dart'; 19 import 'package:analyzer/instrumentation/instrumentation.dart';
20 import 'package:analyzer/source/package_map_resolver.dart'; 20 import 'package:analyzer/source/package_map_resolver.dart';
21 import 'package:analyzer/src/generated/engine.dart'; 21 import 'package:analyzer/src/generated/engine.dart';
22 import 'package:analyzer/src/generated/sdk.dart'; 22 import 'package:analyzer/src/generated/sdk.dart';
23 import 'package:analyzer/src/generated/source.dart'; 23 import 'package:analyzer/src/generated/source.dart';
24 import 'package:plugin/manager.dart'; 24 import 'package:plugin/manager.dart';
25 import 'package:plugin/plugin.dart'; 25 import 'package:plugin/plugin.dart';
26 import 'package:test/test.dart';
26 import 'package:test_reflective_loader/test_reflective_loader.dart'; 27 import 'package:test_reflective_loader/test_reflective_loader.dart';
27 import 'package:typed_mock/typed_mock.dart'; 28 import 'package:typed_mock/typed_mock.dart';
28 import 'package:unittest/unittest.dart';
29 29
30 import 'mock_sdk.dart'; 30 import 'mock_sdk.dart';
31 import 'mocks.dart'; 31 import 'mocks.dart';
32 import 'utils.dart'; 32 import 'utils.dart';
33 33
34 main() { 34 main() {
35 initializeTestEnvironment(); 35 initializeTestEnvironment();
36 defineReflectiveTests(AnalysisServerTest); 36 defineReflectiveSuite(() {
37 defineReflectiveTests(AnalysisServerTest);
38 });
37 } 39 }
38 40
39 @reflectiveTest 41 @reflectiveTest
40 class AnalysisServerTest { 42 class AnalysisServerTest {
41 MockServerChannel channel; 43 MockServerChannel channel;
42 AnalysisServer server; 44 AnalysisServer server;
43 MemoryResourceProvider resourceProvider; 45 MemoryResourceProvider resourceProvider;
44 MockPackageMapProvider packageMapProvider; 46 MockPackageMapProvider packageMapProvider;
45 47
46 /** 48 /**
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after
569 _MockServerOperation(this.context); 571 _MockServerOperation(this.context);
570 572
571 @override 573 @override
572 ServerOperationPriority get priority => ServerOperationPriority.ANALYSIS; 574 ServerOperationPriority get priority => ServerOperationPriority.ANALYSIS;
573 575
574 @override 576 @override
575 void perform(AnalysisServer server) { 577 void perform(AnalysisServer server) {
576 isComplete = true; 578 isComplete = true;
577 } 579 }
578 } 580 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698