Index: pkg/scheduled_test/test/value_future_test.dart |
diff --git a/pkg/scheduled_test/test/value_future_test.dart b/pkg/scheduled_test/test/value_future_test.dart |
index 61ab436284612c5f0c5115b93dfce24a9e40c04a..3cf0fb9179bcca5f7c4ee1c6ff9b7dc20a2fd724 100644 |
--- a/pkg/scheduled_test/test/value_future_test.dart |
+++ b/pkg/scheduled_test/test/value_future_test.dart |
@@ -98,30 +98,39 @@ void main() { |
}); |
test('.value is the result of the future', () { |
- expect(future.value, equals(12)); |
+ future.then(expectAsync1((_) { |
+ expect(future.value, equals(12)); |
+ })); |
nweiz
2013/05/07 00:11:52
These can be
expect(future.then((_) => future
floitsch
2013/05/13 11:19:25
done in CL 15128002.
|
}); |
test('.hasValue is true', () { |
- expect(future.hasValue, isTrue); |
+ future.then(expectAsync1((_) { |
+ expect(future.hasValue, isTrue); |
+ })); |
}); |
}); |
group('after an error completion', () { |
var future; |
+ var safeFuture; |
setUp(() { |
var completer = new Completer(); |
future = new ValueFuture(completer.future); |
- future.catchError((e) {}); |
+ safeFuture = future.catchError((e) {}); |
completer.completeError('bad'); |
}); |
test('.value is null', () { |
- expect(future.value, isNull); |
+ safeFuture.then(expectAsync1((_) { |
+ expect(future.value, isNull); |
+ })); |
}); |
test('.hasValue is false', () { |
- expect(future.hasValue, isFalse); |
+ safeFuture.then(expectAsync1((_) { |
+ expect(future.hasValue, isFalse); |
+ })); |
}); |
}); |
} |