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

Unified Diff: packages/quiver/test/async/stream_buffer_test.dart

Issue 2989763002: Update charted to 0.4.8 and roll (Closed)
Patch Set: Removed Cutch from list of reviewers Created 3 years, 5 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 | « packages/quiver/test/async/enumerate_test.dart ('k') | packages/quiver/test/async/stream_router_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: packages/quiver/test/async/stream_buffer_test.dart
diff --git a/packages/quiver/test/streams/streambuffer_test.dart b/packages/quiver/test/async/stream_buffer_test.dart
similarity index 81%
rename from packages/quiver/test/streams/streambuffer_test.dart
rename to packages/quiver/test/async/stream_buffer_test.dart
index d2a74b7de70e9050f09b42468e3ecf77fa0b486d..f2dd7b8c55a5d90ce5808a2f0b7cce140d6629d2 100644
--- a/packages/quiver/test/streams/streambuffer_test.dart
+++ b/packages/quiver/test/async/stream_buffer_test.dart
@@ -12,17 +12,21 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-library quiver.streams.streambuffer_test;
+library quiver.async.stream_buffer_test;
import 'dart:async';
import 'package:test/test.dart';
-import 'package:quiver/streams.dart';
+import 'package:quiver/async.dart';
void main() {
group("StreamBuffer", () {
test("returns orderly overlaps", () {
- StreamBuffer<int> buf = new StreamBuffer();
- new Stream.fromIterable([[1], [2, 3, 4], [5, 6, 7, 8]]).pipe(buf);
+ StreamBuffer<List<int>> buf = new StreamBuffer();
+ new Stream.fromIterable([
+ [1],
+ [2, 3, 4],
+ [5, 6, 7, 8]
+ ]).pipe(buf);
return Future.wait([buf.read(2), buf.read(4), buf.read(2)]).then((vals) {
expect(vals[0], equals([1, 2]));
expect(vals[1], equals([3, 4, 5, 6]));
@@ -33,8 +37,13 @@ void main() {
});
test("respects pausing of stream", () {
- StreamBuffer<int> buf = new StreamBuffer()..limit = 2;
- new Stream.fromIterable([[1], [2], [3], [4]]).pipe(buf);
+ StreamBuffer<List<int>> buf = new StreamBuffer()..limit = 2;
+ new Stream.fromIterable([
+ [1],
+ [2],
+ [3],
+ [4]
+ ]).pipe(buf);
return buf.read(2).then((val) {
expect(val, [1, 2]);
}).then((_) {
@@ -45,8 +54,11 @@ void main() {
});
test("throws when reading too much", () {
- StreamBuffer<int> buf = new StreamBuffer()..limit = 1;
- new Stream.fromIterable([[1], [2]]).pipe(buf);
+ StreamBuffer<List<int>> buf = new StreamBuffer()..limit = 1;
+ new Stream.fromIterable([
+ [1],
+ [2]
+ ]).pipe(buf);
try {
buf.read(2);
} catch (e) {
« no previous file with comments | « packages/quiver/test/async/enumerate_test.dart ('k') | packages/quiver/test/async/stream_router_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698