Skip to content
Snippets Groups Projects
Commit 36ac354c authored by xuty's avatar xuty
Browse files

Fix broken test

parent ecb4dfc3
No related merge requests found
import 'dart:typed_data';
import 'package:minio/src/utils.dart';
import 'package:test/test.dart';
......@@ -39,20 +41,23 @@ void testRfc7231Time() {
void testBlockStream() {
test('BlockStream can split chunks to blocks', () async {
final streamData = [
[1, 2, 3],
[4, 5, 6],
[7, 8, 9],
[10, 11, 12],
Uint8List.fromList([1, 2]),
Uint8List.fromList([3, 4, 5, 6]),
Uint8List.fromList([7, 8, 9]),
Uint8List.fromList([10, 11, 12, 13]),
];
final stream = Stream.fromIterable(streamData).transform(BlockStream(5));
final stream = Stream.fromIterable(streamData).transform(BlockStream(3));
expect(
await stream.toList(),
equals([
[1, 2, 3, 4, 5],
[6, 7, 8, 9, 10],
[11, 12]
Uint8List.fromList([1, 2]),
Uint8List.fromList([3, 4, 5]),
Uint8List.fromList([6]),
Uint8List.fromList([7, 8, 9]),
Uint8List.fromList([10, 11, 12]),
Uint8List.fromList([13]),
]),
);
});
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment