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 testing.mock_sdk; | 5 library testing.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/context.dart'; | 9 import 'package:analyzer/src/context/context.dart'; |
10 import 'package:analyzer/src/generated/engine.dart'; | 10 import 'package:analyzer/src/generated/engine.dart'; |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 const Object deprecated = const Deprecated("next release"); | 123 const Object deprecated = const Deprecated("next release"); |
124 | 124 |
125 class Iterator<E> { | 125 class Iterator<E> { |
126 bool moveNext(); | 126 bool moveNext(); |
127 E get current; | 127 E get current; |
128 } | 128 } |
129 | 129 |
130 abstract class Iterable<E> { | 130 abstract class Iterable<E> { |
131 Iterator<E> get iterator; | 131 Iterator<E> get iterator; |
132 bool get isEmpty; | 132 bool get isEmpty; |
133 Iterable/*<R>*/ map/*<R>*/(/*=R*/ f(E e)); | 133 Iterable<T> map<T>(T f(E e)) => null; |
| 134 T fold<T>(T initialValue, T combine(T previousValue, E element)); |
134 } | 135 } |
135 | 136 |
136 class List<E> implements Iterable<E> { | 137 class List<E> implements Iterable<E> { |
137 List(); | 138 List(); |
138 void add(E value) {} | 139 void add(E value) {} |
139 void addAll(Iterable<E> iterable) {} | 140 void addAll(Iterable<E> iterable) {} |
140 E operator [](int index) => null; | 141 E operator [](int index) => null; |
141 void operator []=(int index, E value) {} | 142 void operator []=(int index, E value) {} |
142 Iterator<E> get iterator => null; | 143 Iterator<E> get iterator => null; |
143 void clear() {} | 144 void clear() {} |
144 | 145 |
145 bool get isEmpty => false; | 146 bool get isEmpty => false; |
146 E get first => null; | 147 E get first => null; |
147 E get last => null; | 148 E get last => null; |
148 | |
149 Iterable/*<R>*/ map/*<R>*/(/*=R*/ f(E e)) => null; | |
150 | |
151 /*=R*/ fold/*<R>*/(/*=R*/ initialValue, | |
152 /*=R*/ combine(/*=R*/ previousValue, E element)) => null; | |
153 | |
154 } | 149 } |
155 | 150 |
156 abstract class Map<K, V> extends Object { | 151 abstract class Map<K, V> extends Object { |
157 bool containsKey(Object key); | 152 bool containsKey(Object key); |
158 Iterable<K> get keys; | 153 Iterable<K> get keys; |
159 } | 154 } |
160 | 155 |
161 external bool identical(Object a, Object b); | 156 external bool identical(Object a, Object b); |
162 | 157 |
163 void print(Object object) {} | 158 void print(Object object) {} |
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
448 bool get isInternal => shortName.startsWith('dart:_'); | 443 bool get isInternal => shortName.startsWith('dart:_'); |
449 | 444 |
450 @override | 445 @override |
451 bool get isShared => throw unimplemented; | 446 bool get isShared => throw unimplemented; |
452 | 447 |
453 @override | 448 @override |
454 bool get isVmLibrary => throw unimplemented; | 449 bool get isVmLibrary => throw unimplemented; |
455 | 450 |
456 UnimplementedError get unimplemented => new UnimplementedError(); | 451 UnimplementedError get unimplemented => new UnimplementedError(); |
457 } | 452 } |
OLD | NEW |