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 @MirrorsUsed(targets: 'mocks', override: '*') | 7 @MirrorsUsed(targets: 'mocks', override: '*') |
8 import 'dart:mirrors'; | 8 import 'dart:mirrors'; |
9 import 'dart:async'; | 9 import 'dart:async'; |
10 import 'dart:io'; | 10 import 'dart:io'; |
11 | 11 |
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:analysis_server/src/protocol.dart' hide Element, ElementKind; | 16 import 'package:analysis_server/src/protocol.dart' hide Element, ElementKind; |
17 import 'package:analysis_server/src/source/optimizing_pub_package_map_provider.d
art'; | 17 import 'package:analysis_server/src/source/optimizing_pub_package_map_provider.d
art'; |
18 import 'package:analyzer/file_system/file_system.dart' as resource; | 18 import 'package:analyzer/file_system/file_system.dart' as resource; |
19 import 'package:analyzer/file_system/memory_file_system.dart' as resource; | 19 import 'package:analyzer/file_system/memory_file_system.dart' as resource; |
20 import 'package:analyzer/source/package_map_provider.dart'; | 20 import 'package:analyzer/source/package_map_provider.dart'; |
21 import 'package:analyzer/src/generated/element.dart'; | 21 import 'package:analyzer/src/generated/element.dart'; |
22 import 'package:analyzer/src/generated/engine.dart'; | 22 import 'package:analyzer/src/generated/engine.dart'; |
23 import 'package:analyzer/src/generated/source.dart'; | 23 import 'package:analyzer/src/generated/source.dart'; |
24 import 'package:matcher/matcher.dart'; | 24 import 'package:unittest/unittest.dart'; |
25 import 'package:typed_mock/typed_mock.dart'; | 25 import 'package:typed_mock/typed_mock.dart'; |
26 import 'package:unittest/unittest.dart'; | 26 import 'package:unittest/unittest.dart'; |
27 | 27 |
28 /** | 28 /** |
29 * Answer the absolute path the the SDK relative to the currently running | 29 * Answer the absolute path the the SDK relative to the currently running |
30 * script or throw an exception if it cannot be found. | 30 * script or throw an exception if it cannot be found. |
31 */ | 31 */ |
32 String get sdkPath { | 32 String get sdkPath { |
33 Uri sdkUri = Platform.script.resolve('../../../sdk/'); | 33 Uri sdkUri = Platform.script.resolve('../../../sdk/'); |
34 | 34 |
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
481 } | 481 } |
482 return mismatchDescription; | 482 return mismatchDescription; |
483 } | 483 } |
484 | 484 |
485 @override | 485 @override |
486 bool matches(item, Map matchState) { | 486 bool matches(item, Map matchState) { |
487 Response response = item; | 487 Response response = item; |
488 return response != null && response.id == _id && response.error == null; | 488 return response != null && response.id == _id && response.error == null; |
489 } | 489 } |
490 } | 490 } |
OLD | NEW |