| 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 analyzer.test.src.context.mock_sdk; | 5 library analyzer.test.src.context.mock_sdk; |
| 6 | 6 |
| 7 import 'package:analyzer/file_system/file_system.dart' as resource; | 7 import 'package:analyzer/file_system/file_system.dart' as resource; |
| 8 import 'package:analyzer/file_system/memory_file_system.dart' as resource; | 8 import 'package:analyzer/file_system/memory_file_system.dart' as resource; |
| 9 import 'package:analyzer/src/context/cache.dart'; | 9 import 'package:analyzer/src/context/cache.dart'; |
| 10 import 'package:analyzer/src/context/context.dart'; | 10 import 'package:analyzer/src/context/context.dart'; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 | 22 |
| 23 part 'stream.dart'; | 23 part 'stream.dart'; |
| 24 | 24 |
| 25 class Future<T> { | 25 class Future<T> { |
| 26 factory Future(computation()) => null; | 26 factory Future(computation()) => null; |
| 27 factory Future.delayed(Duration duration, [T computation()]) => null; | 27 factory Future.delayed(Duration duration, [T computation()]) => null; |
| 28 factory Future.value([T value]) => null; | 28 factory Future.value([T value]) => null; |
| 29 | 29 |
| 30 static Future<List/*<T>*/> wait/*<T>*/( | 30 static Future<List/*<T>*/> wait/*<T>*/( |
| 31 Iterable<Future/*<T>*/> futures) => null; | 31 Iterable<Future/*<T>*/> futures) => null; |
| 32 Future/*<R>*/ then/*<R>*/(/*=R*/ onValue(T value)) => null; | 32 Future/*<R>*/ then/*<R>*/(onValue(T value)) => null; |
| 33 } | 33 } |
| 34 | 34 |
| 35 abstract class Completer<T> { | 35 abstract class Completer<T> { |
| 36 factory Completer() => new _AsyncCompleter<T>(); | 36 factory Completer() => new _AsyncCompleter<T>(); |
| 37 factory Completer.sync() => new _SyncCompleter<T>(); | 37 factory Completer.sync() => new _SyncCompleter<T>(); |
| 38 Future<T> get future; | 38 Future<T> get future; |
| 39 void complete([value]); | 39 void complete([value]); |
| 40 void completeError(Object error, [StackTrace stackTrace]); | 40 void completeError(Object error, [StackTrace stackTrace]); |
| 41 bool get isCompleted; | 41 bool get isCompleted; |
| 42 } | 42 } |
| (...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 443 | 443 |
| 444 @override | 444 @override |
| 445 AnalysisCache createCacheFromSourceFactory(SourceFactory factory) { | 445 AnalysisCache createCacheFromSourceFactory(SourceFactory factory) { |
| 446 if (factory == null) { | 446 if (factory == null) { |
| 447 return super.createCacheFromSourceFactory(factory); | 447 return super.createCacheFromSourceFactory(factory); |
| 448 } | 448 } |
| 449 return new AnalysisCache( | 449 return new AnalysisCache( |
| 450 <CachePartition>[AnalysisEngine.instance.partitionManager.forSdk(sdk)]); | 450 <CachePartition>[AnalysisEngine.instance.partitionManager.forSdk(sdk)]); |
| 451 } | 451 } |
| 452 } | 452 } |
| OLD | NEW |