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

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

Issue 2656503004: Revert "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 deeb67b6f4b67aa68c4f1d106991cec7ae2e31a5..172580b6ab99dd147b56e7e82e6dba536a6ebdb1 100644
--- a/tests/lib/async/stream_single_test.dart
+++ b/tests/lib/async/stream_single_test.dart
@@ -5,29 +5,30 @@
// Test the Stream.single method.
library stream_single_test;
+import "package:expect/expect.dart";
import 'dart:async';
-import 'package:test/test.dart';
+import 'package:unittest/unittest.dart';
import 'event_helper.dart';
main() {
test("single", () {
StreamController c = new StreamController(sync: true);
Future f = c.stream.single;
- f.then(expectAsync((v) { expect(42, equals(v));}));
+ f.then(expectAsync((v) { Expect.equals(42, 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(error is StateError, isTrue); }));
+ f.catchError(expectAsync((error) { Expect.isTrue(error is StateError); }));
new Events.fromIterable([]).replay(c);
});
test("single error", () {
StreamController c = new StreamController(sync: true);
Future f = c.stream.single;
- f.catchError(expectAsync((error) { expect("error", equals(error)); }));
+ f.catchError(expectAsync((error) { Expect.equals("error", error); }));
Events errorEvents = new Events()..error("error")..close();
errorEvents.replay(c);
});
@@ -35,7 +36,7 @@ main() {
test("single error 2", () {
StreamController c = new StreamController(sync: true);
Future f = c.stream.single;
- f.catchError(expectAsync((error) { expect("error", equals(error)); }));
+ f.catchError(expectAsync((error) { Expect.equals("error", error); }));
Events errorEvents = new Events()..error("error")..error("error2")..close();
errorEvents.replay(c);
});
@@ -43,7 +44,7 @@ main() {
test("single error 3", () {
StreamController c = new StreamController(sync: true);
Future f = c.stream.single;
- f.catchError(expectAsync((error) { expect("error", equals(error)); }));
+ f.catchError(expectAsync((error) { Expect.equals("error", 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