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

Side by Side Diff: pkg/analysis_server/test/mocks.dart

Issue 341893010: Use "pub list-package-dirs" to resolve package URIs in analysis server. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
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 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 @MirrorsUsed(targets: 'mocks', override: '*') 10 @MirrorsUsed(targets: 'mocks', override: '*')
11 import 'dart:mirrors'; 11 import 'dart:mirrors';
12 12
13 import 'package:analysis_server/src/analysis_server.dart';
14 import 'package:analysis_server/src/channel.dart';
15 import 'package:analysis_server/src/operation/operation_analysis.dart';
16 import 'package:analysis_server/src/operation/operation.dart';
17 import 'package:analysis_server/src/package_map_provider.dart';
18 import 'package:analysis_server/src/protocol.dart';
19 import 'package:analysis_server/src/resource.dart' as resource;
13 import 'package:analyzer/src/generated/engine.dart'; 20 import 'package:analyzer/src/generated/engine.dart';
14 import 'package:analyzer/src/generated/sdk.dart'; 21 import 'package:analyzer/src/generated/sdk.dart';
15 import 'package:analyzer/src/generated/source.dart'; 22 import 'package:analyzer/src/generated/source.dart';
16 import 'package:analysis_server/src/analysis_server.dart';
17 import 'package:analysis_server/src/channel.dart';
18 import 'package:analysis_server/src/protocol.dart';
19 import 'package:analysis_server/src/resource.dart' as resource;
20 import 'package:matcher/matcher.dart'; 23 import 'package:matcher/matcher.dart';
21 import 'package:mock/mock.dart'; 24 import 'package:mock/mock.dart';
22 import 'package:unittest/unittest.dart'; 25 import 'package:unittest/unittest.dart';
23 import 'package:analysis_server/src/operation/operation_analysis.dart';
24 import 'package:analysis_server/src/operation/operation.dart';
25 26
26 /** 27 /**
27 * Answer the absolute path the the SDK relative to the currently running 28 * Answer the absolute path the the SDK relative to the currently running
28 * script or throw an exception if it cannot be found. 29 * script or throw an exception if it cannot be found.
29 */ 30 */
30 String get sdkPath { 31 String get sdkPath {
31 Uri sdkUri = Platform.script.resolve('../../../sdk/'); 32 Uri sdkUri = Platform.script.resolve('../../../sdk/');
32 33
33 // Verify the directory exists 34 // Verify the directory exists
34 Directory sdkDir = new Directory.fromUri(sdkUri); 35 Directory sdkDir = new Directory.fromUri(sdkUri);
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 404
404 // Not used. 405 // Not used.
405 @override 406 @override
406 String get sdkVersion => throw unimplemented; 407 String get sdkVersion => throw unimplemented;
407 408
408 // Not used. 409 // Not used.
409 @override 410 @override
410 List<String> get uris => throw unimplemented; 411 List<String> get uris => throw unimplemented;
411 } 412 }
412 413
414 /**
415 * A mock [PackageMapProvider].
416 */
417 class MockPackageMapProvider implements PackageMapProvider {
418 Map<String, resource.Folder> packageMap = <String, resource.Folder>{};
419
420 @override
421 Map<String, resource.Folder> computePackageMap(resource.Folder folder) {
422 return packageMap;
423 }
424 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698