OLD | NEW |
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 mocks; | 5 library mocks; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 import 'dart:io'; | 8 import 'dart:io'; |
9 | 9 |
10 import 'package:analysis_server/plugin/protocol/protocol.dart' | 10 import 'package:analysis_server/plugin/protocol/protocol.dart' |
11 hide Element, ElementKind; | 11 hide Element, ElementKind; |
12 import 'package:analysis_server/src/analysis_server.dart'; | 12 import 'package:analysis_server/src/analysis_server.dart'; |
13 import 'package:analysis_server/src/channel/channel.dart'; | 13 import 'package:analysis_server/src/channel/channel.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/operation/operation_analysis.dart'; | 15 import 'package:analysis_server/src/operation/operation_analysis.dart'; |
16 import 'package:analyzer/dart/element/element.dart'; | 16 import 'package:analyzer/dart/element/element.dart'; |
17 import 'package:analyzer/file_system/file_system.dart' as resource; | 17 import 'package:analyzer/file_system/file_system.dart' as resource; |
18 import 'package:analyzer/file_system/memory_file_system.dart' as resource; | 18 import 'package:analyzer/file_system/memory_file_system.dart' as resource; |
19 import 'package:analyzer/source/package_map_provider.dart'; | 19 import 'package:analyzer/source/package_map_provider.dart'; |
20 import 'package:analyzer/source/pub_package_map_provider.dart'; | 20 import 'package:analyzer/source/pub_package_map_provider.dart'; |
21 import 'package:analyzer/src/generated/engine.dart'; | 21 import 'package:analyzer/src/generated/engine.dart'; |
22 import 'package:analyzer/src/generated/source.dart'; | 22 import 'package:analyzer/src/generated/source.dart'; |
| 23 import 'package:test/test.dart'; |
23 import 'package:typed_mock/typed_mock.dart'; | 24 import 'package:typed_mock/typed_mock.dart'; |
24 import 'package:unittest/unittest.dart'; | |
25 | 25 |
26 /** | 26 /** |
27 * Answer the absolute path the SDK relative to the currently running | 27 * Answer the absolute path the SDK relative to the currently running |
28 * script or throw an exception if it cannot be found. | 28 * script or throw an exception if it cannot be found. |
29 */ | 29 */ |
30 String get sdkPath { | 30 String get sdkPath { |
31 Uri sdkUri = Platform.script.resolve('../../../sdk/'); | 31 Uri sdkUri = Platform.script.resolve('../../../sdk/'); |
32 | 32 |
33 // Verify the directory exists | 33 // Verify the directory exists |
34 Directory sdkDir = new Directory.fromUri(sdkUri); | 34 Directory sdkDir = new Directory.fromUri(sdkUri); |
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
431 } | 431 } |
432 return mismatchDescription; | 432 return mismatchDescription; |
433 } | 433 } |
434 | 434 |
435 @override | 435 @override |
436 bool matches(item, Map matchState) { | 436 bool matches(item, Map matchState) { |
437 Response response = item; | 437 Response response = item; |
438 return response != null && response.id == _id && response.error == null; | 438 return response != null && response.id == _id && response.error == null; |
439 } | 439 } |
440 } | 440 } |
OLD | NEW |