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

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

Issue 2656743002: Remove package:unittest from some tests (Closed)
Patch Set: Created 3 years, 11 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 | « tests/lib/async/stream_state_test.dart ('k') | tests/lib/async/stream_subscription_cancel_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/lib/async/stream_subscription_as_future_test.dart
diff --git a/tests/lib/async/stream_subscription_as_future_test.dart b/tests/lib/async/stream_subscription_as_future_test.dart
index 841298b1990339a5440dff21a6bb59d35b4307e8..dfb4ec09cd8f513a81b7dd7c32aa0ee8f5fb068f 100644
--- a/tests/lib/async/stream_subscription_as_future_test.dart
+++ b/tests/lib/async/stream_subscription_as_future_test.dart
@@ -5,9 +5,8 @@
// Test the Stream.single method.
library stream_single_test;
-import "package:expect/expect.dart";
import 'dart:async';
-import 'package:unittest/unittest.dart';
+import 'package:test/test.dart';
main() {
test("subscription.asFuture success", () {
@@ -15,7 +14,7 @@ main() {
var output = [];
var subscription = stream.listen((x) { output.add(x); });
subscription.asFuture(output).then(expectAsync((o) {
- Expect.listEquals([1, 2, 3], o);
+ expect([1, 2, 3], equals(o));
}));
});
@@ -27,7 +26,7 @@ main() {
var output = [];
var subscription = stream.listen((x) { output.add(x); });
subscription.asFuture(output).then(expectAsync((o) {
- Expect.listEquals([1, 2, 3], o);
+ expect([1, 2, 3], equals(o));
}));
});
@@ -36,7 +35,7 @@ main() {
var output = [];
var subscription = stream.listen((x) { output.add(x); });
subscription.asFuture(output).then(expectAsync((o) {
- Expect.listEquals([1, 2, 3], o);
+ expect([1, 2, 3], equals(o));
}));
});
@@ -46,8 +45,8 @@ main() {
var output = [];
var subscription = stream.listen((x) { output.add(x); });
subscription.asFuture("string").then((String o) {
- Expect.listEquals([1, 2, 3], output);
- Expect.equals("string", o);
+ expect([1, 2, 3], equals(output));
+ expect("string", equals(o));
asyncCallback();
});
});
@@ -61,7 +60,7 @@ main() {
var output = [];
var subscription = stream.listen((x) { output.add(x); });
subscription.asFuture(output).catchError(expectAsync((error) {
- Expect.equals(error, "foo");
+ expect(error, equals("foo"));
}));
});
@@ -74,7 +73,7 @@ main() {
var output = [];
var subscription = stream.listen((x) { output.add(x); });
subscription.asFuture(output).catchError(expectAsync((error) {
- Expect.equals(error, "foo");
+ expect(error, equals("foo"));
}));
});
@@ -90,11 +89,11 @@ main() {
var subscription = stream.listen((x) { output.add(x); });
bool catchErrorHasRun = false;
subscription.asFuture(output).catchError(expectAsync((error) {
- Expect.equals(error, "foo");
+ expect(error, equals("foo"));
catchErrorHasRun = true;
}));
Timer.run(expectAsync(() {
- Expect.isFalse(catchErrorHasRun);
+ expect(catchErrorHasRun, isFalse);
completer.complete();
}));
});
@@ -112,15 +111,15 @@ main() {
var subscription = stream.listen((x) { output.add(x); });
bool catchErrorHasRun = false;
subscription.asFuture(output).catchError(expectAsync((error) {
- Expect.equals(error, "foo");
+ expect(error, equals("foo"));
catchErrorHasRun = true;
}));
Timer.run(expectAsync(() {
- Expect.isFalse(catchErrorHasRun);
+ expect(catchErrorHasRun, isFalse);
completer.completeError(499);
}));
}, onError: expectAsync((e) {
- Expect.equals(499, e);
+ expect(499, equals(e));
}));
});
}
« no previous file with comments | « tests/lib/async/stream_state_test.dart ('k') | tests/lib/async/stream_subscription_cancel_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698