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

Unified Diff: tests/lib/async/stream_transformation_broadcast_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
« no previous file with comments | « tests/lib/async/stream_transform_test.dart ('k') | tests/lib/async/timer_cancel1_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/lib/async/stream_transformation_broadcast_test.dart
diff --git a/tests/lib/async/stream_transformation_broadcast_test.dart b/tests/lib/async/stream_transformation_broadcast_test.dart
index b6f8612744633faa07ffb25533e48e2fd2e9c1f4..ce9c882e4fcb11ec3a0eec6904bdce9e6304098c 100644
--- a/tests/lib/async/stream_transformation_broadcast_test.dart
+++ b/tests/lib/async/stream_transformation_broadcast_test.dart
@@ -7,7 +7,8 @@ library stream_join_test;
import 'dart:async';
import 'event_helper.dart';
-import 'package:test/test.dart';
+import 'package:unittest/unittest.dart';
+import "package:expect/expect.dart";
main() {
testStream("singlesub", () => new StreamController(), (c) => c.stream);
@@ -26,9 +27,9 @@ void testStream(String name,
var c = create();
var s = getStream(c);
Stream newStream = s.map((x) => x + 1);
- expect(s.isBroadcast, equals(newStream.isBroadcast));
+ Expect.equals(s.isBroadcast, newStream.isBroadcast);
newStream.single.then(expectAsync((v) {
- expect(43, equals(v));
+ Expect.equals(43, v);
}));
c.add(42);
c.close();
@@ -37,9 +38,9 @@ void testStream(String name,
var c = create();
var s = getStream(c);
Stream newStream = s.where((x) => x.isEven);
- expect(s.isBroadcast, equals(newStream.isBroadcast));
+ Expect.equals(s.isBroadcast, newStream.isBroadcast);
newStream.single.then(expectAsync((v) {
- expect(42, equals(v));
+ Expect.equals(42, v);
}));
c.add(37);
c.add(42);
@@ -50,9 +51,9 @@ void testStream(String name,
var c = create();
var s = getStream(c);
Stream newStream = s.handleError((x, s) {});
- expect(s.isBroadcast, equals(newStream.isBroadcast));
+ Expect.equals(s.isBroadcast, newStream.isBroadcast);
newStream.single.then(expectAsync((v) {
- expect(42, equals(v));
+ Expect.equals(42, v);
}));
c.addError("BAD1");
c.add(42);
@@ -63,9 +64,9 @@ void testStream(String name,
var c = create();
var s = getStream(c);
Stream newStream = s.expand((x) => x.isEven ? [x] : []);
- expect(s.isBroadcast, equals(newStream.isBroadcast));
+ Expect.equals(s.isBroadcast, newStream.isBroadcast);
newStream.single.then(expectAsync((v) {
- expect(42, equals(v));
+ Expect.equals(42, v);
}));
c.add(37);
c.add(42);
@@ -80,9 +81,9 @@ void testStream(String name,
handleData: (value, EventSink sink) { sink.add(value); }
);
Stream newStream = s.transform(t);
- expect(s.isBroadcast, equals(newStream.isBroadcast));
+ Expect.equals(s.isBroadcast, newStream.isBroadcast);
newStream.single.then(expectAsync((v) {
- expect(42, equals(v));
+ Expect.equals(42, v);
}));
c.add(42);
c.close();
@@ -91,9 +92,9 @@ void testStream(String name,
var c = create();
var s = getStream(c);
Stream newStream = s.take(1);
- expect(s.isBroadcast, equals(newStream.isBroadcast));
+ Expect.equals(s.isBroadcast, newStream.isBroadcast);
newStream.single.then(expectAsync((v) {
- expect(42, equals(v));
+ Expect.equals(42, v);
}));
c.add(42);
c.add(37);
@@ -103,9 +104,9 @@ void testStream(String name,
var c = create();
var s = getStream(c);
Stream newStream = s.takeWhile((x) => x.isEven);
- expect(s.isBroadcast, equals(newStream.isBroadcast));
+ Expect.equals(s.isBroadcast, newStream.isBroadcast);
newStream.single.then(expectAsync((v) {
- expect(42, equals(v));
+ Expect.equals(42, v);
}));
c.add(42);
c.add(37);
@@ -115,9 +116,9 @@ void testStream(String name,
var c = create();
var s = getStream(c);
Stream newStream = s.skip(1);
- expect(s.isBroadcast, equals(newStream.isBroadcast));
+ Expect.equals(s.isBroadcast, newStream.isBroadcast);
newStream.single.then(expectAsync((v) {
- expect(42, equals(v));
+ Expect.equals(42, v);
}));
c.add(37);
c.add(42);
@@ -127,9 +128,9 @@ void testStream(String name,
var c = create();
var s = getStream(c);
Stream newStream = s.skipWhile((x) => x.isOdd);
- expect(s.isBroadcast, equals(newStream.isBroadcast));
+ Expect.equals(s.isBroadcast, newStream.isBroadcast);
newStream.single.then(expectAsync((v) {
- expect(42, equals(v));
+ Expect.equals(42, v);
}));
c.add(37);
c.add(42);
@@ -139,9 +140,9 @@ void testStream(String name,
var c = create();
var s = getStream(c);
Stream newStream = s.distinct();
- expect(s.isBroadcast, equals(newStream.isBroadcast));
+ Expect.equals(s.isBroadcast, newStream.isBroadcast);
newStream.single.then(expectAsync((v) {
- expect(42, equals(v));
+ Expect.equals(42, v);
}));
c.add(42);
c.add(42);
@@ -151,9 +152,9 @@ void testStream(String name,
var c = create();
var s = getStream(c);
Stream newStream = s.timeout(const Duration(seconds: 1));
- expect(s.isBroadcast, equals(newStream.isBroadcast));
+ Expect.equals(s.isBroadcast, newStream.isBroadcast);
newStream.single.then(expectAsync((v) {
- expect(42, equals(v));
+ Expect.equals(42, v);
}));
c.add(42);
c.close();
@@ -162,9 +163,9 @@ void testStream(String name,
var c = create();
var s = getStream(c);
Stream newStream = s.asyncMap((x) => new Future.value(x + 1));
- expect(s.isBroadcast, equals(newStream.isBroadcast));
+ Expect.equals(s.isBroadcast, newStream.isBroadcast);
newStream.single.then(expectAsync((v) {
- expect(43, equals(v));
+ Expect.equals(43, v);
}));
c.add(42);
c.close();
@@ -173,9 +174,9 @@ void testStream(String name,
var c = create();
var s = getStream(c);
Stream newStream = s.asyncExpand((x) => new Stream.fromIterable([x + 1]));
- expect(s.isBroadcast, equals(newStream.isBroadcast));
+ Expect.equals(s.isBroadcast, newStream.isBroadcast);
newStream.single.then(expectAsync((v) {
- expect(43, equals(v));
+ Expect.equals(43, v);
}));
c.add(42);
c.close();
@@ -321,7 +322,7 @@ void testStream(String name,
// Listen immediately, to ensure that an asBroadcast stream is started.
var sub = newStream.listen((_){});
int i = 0;
- // Non-overlapping ranges means the test must not remember its first
+ // Non-overlapping ranges means the test must not remember its first
// failure.
var expect1 = 6;
var expect2 = 16;
« no previous file with comments | « tests/lib/async/stream_transform_test.dart ('k') | tests/lib/async/timer_cancel1_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698