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

Unified Diff: pkg/analyzer/test/src/context/mock_sdk.dart

Issue 2980863002: Fix MockSdk in analyzer for problems that cause exceptions in Fasta. (Closed)
Patch Set: Created 3 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/src/context/mock_sdk.dart
diff --git a/pkg/analyzer/test/src/context/mock_sdk.dart b/pkg/analyzer/test/src/context/mock_sdk.dart
index cec5d79fae93776c082bd1eaa9a737325b211d7c..09fde808a8747960251d33759241a65be8156c4b 100644
--- a/pkg/analyzer/test/src/context/mock_sdk.dart
+++ b/pkg/analyzer/test/src/context/mock_sdk.dart
@@ -55,8 +55,8 @@ class Future<T> {
class FutureOr<T> {}
abstract class Completer<T> {
- factory Completer() => new _AsyncCompleter<T>();
- factory Completer.sync() => new _SyncCompleter<T>();
+ factory Completer() => null;
+ factory Completer.sync() => null;
Future<T> get future;
void complete([value]);
void completeError(Object error, [StackTrace stackTrace]);
@@ -121,7 +121,7 @@ library dart.core;
import 'dart:async';
class Object {
- const Object() {}
+ const Object();
bool operator ==(other) => identical(this, other);
String toString() => 'a string';
int get hashCode => 0;
@@ -245,9 +245,7 @@ abstract class double extends num {
class DateTime extends Object {}
class Null extends Object {
- factory Null._uninstantiable() {
- throw new UnsupportedError('class Null cannot be instantiated');
- }
+ factory Null._uninstantiable() => null;
}
class Deprecated extends Object {
@@ -269,7 +267,7 @@ abstract class Iterable<E> {
Iterable/*<R>*/ map/*<R>*/(/*=R*/ f(E e));
/*=R*/ fold/*<R>*/(/*=R*/ initialValue,
- /*=R*/ combine(/*=R*/ previousValue, E element));
+ /*=R*/ combine(/*=R*/ previousValue, E element)) => null;
Iterable/*<T>*/ expand/*<T>*/(Iterable/*<T>*/ f(E element));
@@ -278,9 +276,6 @@ abstract class Iterable<E> {
void forEach(void f(E element));
List<E> toList();
-
- /*=R*/ fold/*<R>*/(/*=R*/ initialValue,
- /*=R*/ combine(/*=R*/ previousValue, E element)) => null;
}
class List<E> implements Iterable<E> {
@@ -306,6 +301,8 @@ class Map<K, V> extends Object {
Iterable<V> get values;
}
+class Duration implements Comparable<Duration> {}
+
external bool identical(Object a, Object b);
void print(Object object) {}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698