| 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 ''', | 65 ''', |
| 66 const <String, String>{ | 66 const <String, String>{ |
| 67 '$sdkRoot/lib/async/stream.dart': r''' | 67 '$sdkRoot/lib/async/stream.dart': r''' |
| 68 part of dart.async; | 68 part of dart.async; |
| 69 abstract class Stream<T> { | 69 abstract class Stream<T> { |
| 70 Future<T> get first; | 70 Future<T> get first; |
| 71 StreamSubscription<T> listen(void onData(T event), | 71 StreamSubscription<T> listen(void onData(T event), |
| 72 { Function onError, | 72 { Function onError, |
| 73 void onDone(), | 73 void onDone(), |
| 74 bool cancelOnError}); | 74 bool cancelOnError}); |
| 75 Stream(); |
| 76 factory Stream.fromIterable(Iterable<T> data); |
| 75 } | 77 } |
| 76 | 78 |
| 77 abstract class StreamSubscription<T> { | 79 abstract class StreamSubscription<T> { |
| 78 Future cancel(); | 80 Future cancel(); |
| 79 void onData(void handleData(T data)); | 81 void onData(void handleData(T data)); |
| 80 void onError(Function handleError); | 82 void onError(Function handleError); |
| 81 void onDone(void handleDone()); | 83 void onDone(void handleDone()); |
| 82 void pause([Future resumeSignal]); | 84 void pause([Future resumeSignal]); |
| 83 void resume(); | 85 void resume(); |
| 84 bool get isPaused; | 86 bool get isPaused; |
| (...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 627 | 629 |
| 628 @override | 630 @override |
| 629 AnalysisCache createCacheFromSourceFactory(SourceFactory factory) { | 631 AnalysisCache createCacheFromSourceFactory(SourceFactory factory) { |
| 630 if (factory == null) { | 632 if (factory == null) { |
| 631 return super.createCacheFromSourceFactory(factory); | 633 return super.createCacheFromSourceFactory(factory); |
| 632 } | 634 } |
| 633 return new AnalysisCache( | 635 return new AnalysisCache( |
| 634 <CachePartition>[AnalysisEngine.instance.partitionManager.forSdk(sdk)]); | 636 <CachePartition>[AnalysisEngine.instance.partitionManager.forSdk(sdk)]); |
| 635 } | 637 } |
| 636 } | 638 } |
| OLD | NEW |