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

Unified Diff: tests/lib/async/stream_iterator_test.dart

Issue 218273002: Upgrading tests with unittest deprecations (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 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
Index: tests/lib/async/stream_iterator_test.dart
diff --git a/tests/lib/async/stream_iterator_test.dart b/tests/lib/async/stream_iterator_test.dart
index 56240cc9fd6e6207f1231cf623f6a04687760737..57bd6cce150f40ceb51493525d55d1d524aab06c 100644
--- a/tests/lib/async/stream_iterator_test.dart
+++ b/tests/lib/async/stream_iterator_test.dart
@@ -10,15 +10,15 @@ main() {
StreamController c = new StreamController();
Stream s = c.stream;
StreamIterator i = new StreamIterator(s);
- i.moveNext().then(expectAsync1((bool b) {
+ i.moveNext().then(expectAsync((bool b) {
expect(b, isTrue);
expect(42, i.current);
return i.moveNext();
- })).then(expectAsync1((bool b) {
+ })).then(expectAsync((bool b) {
expect(b, isTrue);
expect(37, i.current);
return i.moveNext();
- })).then(expectAsync1((bool b) {
+ })).then(expectAsync((bool b) {
expect(b, isFalse);
}));
c.add(42);
@@ -33,15 +33,15 @@ main() {
c.close();
Stream s = c.stream;
StreamIterator i = new StreamIterator(s);
- i.moveNext().then(expectAsync1((bool b) {
+ i.moveNext().then(expectAsync((bool b) {
expect(b, isTrue);
expect(42, i.current);
return i.moveNext();
- })).then(expectAsync1((bool b) {
+ })).then(expectAsync((bool b) {
expect(b, isTrue);
expect(37, i.current);
return i.moveNext();
- })).then(expectAsync1((bool b) {
+ })).then(expectAsync((bool b) {
expect(b, isFalse);
}));
});
@@ -50,16 +50,16 @@ main() {
StreamController c = new StreamController();
Stream s = c.stream;
StreamIterator i = new StreamIterator(s);
- i.moveNext().then(expectAsync1((bool b) {
+ i.moveNext().then(expectAsync((bool b) {
expect(b, isTrue);
expect(42, i.current);
return i.moveNext();
})).then((bool b) {
fail("Result not expected");
- }, onError: expectAsync1((e) {
+ }, onError: expectAsync((e) {
expect("BAD", e);
return i.moveNext();
- })).then(expectAsync1((bool b) {
+ })).then(expectAsync((bool b) {
expect(b, isFalse);
}));
c.add(42);
@@ -72,21 +72,21 @@ main() {
StreamController c = new StreamController();
Stream s = c.stream;
StreamIterator i = new StreamIterator(s);
- i.moveNext().then(expectAsync1((bool b) {
+ i.moveNext().then(expectAsync((bool b) {
expect(b, isTrue);
expect(42, i.current);
- new Timer(const Duration(milliseconds:100), expectAsync0(() {
+ new Timer(const Duration(milliseconds:100), expectAsync(() {
expect(i.current, null);
expect(() { i.moveNext(); }, throws);
c.add(37);
c.close();
}));
return i.moveNext();
- })).then(expectAsync1((bool b) {
+ })).then(expectAsync((bool b) {
expect(b, isTrue);
expect(37, i.current);
return i.moveNext();
- })).then(expectAsync1((bool b) {
+ })).then(expectAsync((bool b) {
expect(b, isFalse);
}));
c.add(42);

Powered by Google App Engine
This is Rietveld 408576698