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

Unified Diff: tests/lib/async/stream_single_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
Index: tests/lib/async/stream_single_test.dart
diff --git a/tests/lib/async/stream_single_test.dart b/tests/lib/async/stream_single_test.dart
index 172580b6ab99dd147b56e7e82e6dba536a6ebdb1..deeb67b6f4b67aa68c4f1d106991cec7ae2e31a5 100644
--- a/tests/lib/async/stream_single_test.dart
+++ b/tests/lib/async/stream_single_test.dart
@@ -5,30 +5,29 @@
// 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';
import 'event_helper.dart';
main() {
test("single", () {
StreamController c = new StreamController(sync: true);
Future f = c.stream.single;
- f.then(expectAsync((v) { Expect.equals(42, v);}));
+ f.then(expectAsync((v) { expect(42, equals(v));}));
new Events.fromIterable([42]).replay(c);
});
test("single empty", () {
StreamController c = new StreamController(sync: true);
Future f = c.stream.single;
- f.catchError(expectAsync((error) { Expect.isTrue(error is StateError); }));
+ f.catchError(expectAsync((error) { expect(error is StateError, isTrue); }));
new Events.fromIterable([]).replay(c);
});
test("single error", () {
StreamController c = new StreamController(sync: true);
Future f = c.stream.single;
- f.catchError(expectAsync((error) { Expect.equals("error", error); }));
+ f.catchError(expectAsync((error) { expect("error", equals(error)); }));
Events errorEvents = new Events()..error("error")..close();
errorEvents.replay(c);
});
@@ -36,7 +35,7 @@ main() {
test("single error 2", () {
StreamController c = new StreamController(sync: true);
Future f = c.stream.single;
- f.catchError(expectAsync((error) { Expect.equals("error", error); }));
+ f.catchError(expectAsync((error) { expect("error", equals(error)); }));
Events errorEvents = new Events()..error("error")..error("error2")..close();
errorEvents.replay(c);
});
@@ -44,7 +43,7 @@ main() {
test("single error 3", () {
StreamController c = new StreamController(sync: true);
Future f = c.stream.single;
- f.catchError(expectAsync((error) { Expect.equals("error", error); }));
+ f.catchError(expectAsync((error) { expect("error", equals(error)); }));
Events errorEvents = new Events()..add(499)..error("error")..close();
errorEvents.replay(c);
});
« no previous file with comments | « tests/lib/async/stream_periodic_test.dart ('k') | tests/lib/async/stream_single_to_multi_subscriber_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698