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; |