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

Unified Diff: tests/lib/async/stream_transformation_broadcast_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_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 ce9c882e4fcb11ec3a0eec6904bdce9e6304098c..b6f8612744633faa07ffb25533e48e2fd2e9c1f4 100644
--- a/tests/lib/async/stream_transformation_broadcast_test.dart
+++ b/tests/lib/async/stream_transformation_broadcast_test.dart
@@ -7,8 +7,7 @@ library stream_join_test;
import 'dart:async';
import 'event_helper.dart';
-import 'package:unittest/unittest.dart';
-import "package:expect/expect.dart";
+import 'package:test/test.dart';
main() {
testStream("singlesub", () => new StreamController(), (c) => c.stream);
@@ -27,9 +26,9 @@ void testStream(String name,
var c = create();
var s = getStream(c);
Stream newStream = s.map((x) => x + 1);
- Expect.equals(s.isBroadcast, newStream.isBroadcast);
+ expect(s.isBroadcast, equals(newStream.isBroadcast));
newStream.single.then(expectAsync((v) {
- Expect.equals(43, v);
+ expect(43, equals(v));
}));
c.add(42);
c.close();
@@ -38,9 +37,9 @@ void testStream(String name,
var c = create();
var s = getStream(c);
Stream newStream = s.where((x) => x.isEven);
- Expect.equals(s.isBroadcast, newStream.isBroadcast);
+ expect(s.isBroadcast, equals(newStream.isBroadcast));
newStream.single.then(expectAsync((v) {
- Expect.equals(42, v);
+ expect(42, equals(v));
}));
c.add(37);
c.add(42);
@@ -51,9 +50,9 @@ void testStream(String name,
var c = create();
var s = getStream(c);
Stream newStream = s.handleError((x, s) {});
- Expect.equals(s.isBroadcast, newStream.isBroadcast);
+ expect(s.isBroadcast, equals(newStream.isBroadcast));
newStream.single.then(expectAsync((v) {
- Expect.equals(42, v);
+ expect(42, equals(v));
}));
c.addError("BAD1");
c.add(42);
@@ -64,9 +63,9 @@ void testStream(String name,
var c = create();
var s = getStream(c);
Stream newStream = s.expand((x) => x.isEven ? [x] : []);
- Expect.equals(s.isBroadcast, newStream.isBroadcast);
+ expect(s.isBroadcast, equals(newStream.isBroadcast));
newStream.single.then(expectAsync((v) {
- Expect.equals(42, v);
+ expect(42, equals(v));
}));
c.add(37);
c.add(42);
@@ -81,9 +80,9 @@ void testStream(String name,
handleData: (value, EventSink sink) { sink.add(value); }
);
Stream newStream = s.transform(t);
- Expect.equals(s.isBroadcast, newStream.isBroadcast);
+ expect(s.isBroadcast, equals(newStream.isBroadcast));
newStream.single.then(expectAsync((v) {
- Expect.equals(42, v);
+ expect(42, equals(v));
}));
c.add(42);
c.close();
@@ -92,9 +91,9 @@ void testStream(String name,
var c = create();
var s = getStream(c);
Stream newStream = s.take(1);
- Expect.equals(s.isBroadcast, newStream.isBroadcast);
+ expect(s.isBroadcast, equals(newStream.isBroadcast));
newStream.single.then(expectAsync((v) {
- Expect.equals(42, v);
+ expect(42, equals(v));
}));
c.add(42);
c.add(37);
@@ -104,9 +103,9 @@ void testStream(String name,
var c = create();
var s = getStream(c);
Stream newStream = s.takeWhile((x) => x.isEven);
- Expect.equals(s.isBroadcast, newStream.isBroadcast);
+ expect(s.isBroadcast, equals(newStream.isBroadcast));
newStream.single.then(expectAsync((v) {
- Expect.equals(42, v);
+ expect(42, equals(v));
}));
c.add(42);
c.add(37);
@@ -116,9 +115,9 @@ void testStream(String name,
var c = create();
var s = getStream(c);
Stream newStream = s.skip(1);
- Expect.equals(s.isBroadcast, newStream.isBroadcast);
+ expect(s.isBroadcast, equals(newStream.isBroadcast));
newStream.single.then(expectAsync((v) {
- Expect.equals(42, v);
+ expect(42, equals(v));
}));
c.add(37);
c.add(42);
@@ -128,9 +127,9 @@ void testStream(String name,
var c = create();
var s = getStream(c);
Stream newStream = s.skipWhile((x) => x.isOdd);
- Expect.equals(s.isBroadcast, newStream.isBroadcast);
+ expect(s.isBroadcast, equals(newStream.isBroadcast));
newStream.single.then(expectAsync((v) {
- Expect.equals(42, v);
+ expect(42, equals(v));
}));
c.add(37);
c.add(42);
@@ -140,9 +139,9 @@ void testStream(String name,
var c = create();
var s = getStream(c);
Stream newStream = s.distinct();
- Expect.equals(s.isBroadcast, newStream.isBroadcast);
+ expect(s.isBroadcast, equals(newStream.isBroadcast));
newStream.single.then(expectAsync((v) {
- Expect.equals(42, v);
+ expect(42, equals(v));
}));
c.add(42);
c.add(42);
@@ -152,9 +151,9 @@ void testStream(String name,
var c = create();
var s = getStream(c);
Stream newStream = s.timeout(const Duration(seconds: 1));
- Expect.equals(s.isBroadcast, newStream.isBroadcast);
+ expect(s.isBroadcast, equals(newStream.isBroadcast));
newStream.single.then(expectAsync((v) {
- Expect.equals(42, v);
+ expect(42, equals(v));
}));
c.add(42);
c.close();
@@ -163,9 +162,9 @@ void testStream(String name,
var c = create();
var s = getStream(c);
Stream newStream = s.asyncMap((x) => new Future.value(x + 1));
- Expect.equals(s.isBroadcast, newStream.isBroadcast);
+ expect(s.isBroadcast, equals(newStream.isBroadcast));
newStream.single.then(expectAsync((v) {
- Expect.equals(43, v);
+ expect(43, equals(v));
}));
c.add(42);
c.close();
@@ -174,9 +173,9 @@ void testStream(String name,
var c = create();
var s = getStream(c);
Stream newStream = s.asyncExpand((x) => new Stream.fromIterable([x + 1]));
- Expect.equals(s.isBroadcast, newStream.isBroadcast);
+ expect(s.isBroadcast, equals(newStream.isBroadcast));
newStream.single.then(expectAsync((v) {
- Expect.equals(43, v);
+ expect(43, equals(v));
}));
c.add(42);
c.close();
@@ -322,7 +321,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