Lines Matching refs:Uint8Array
25 c.enqueue(new Uint8Array([0x01]));
26 c.enqueue(new Uint8Array([0x02]));
38 const result = await reader1.read(new Uint8Array(1));
40 assert_typed_array_equals(result.value, new Uint8Array([0x01]), 'value');
44 const result = await reader1.read(new Uint8Array(1));
46 assert_typed_array_equals(result.value, new Uint8Array([0x02]), 'value');
50 const result = await reader1.read(new Uint8Array(1));
52 assert_typed_array_equals(result.value, new Uint8Array([0]).subarray(0, 0), 'value');
56 const result = await reader2.read(new Uint8Array(1));
58 assert_typed_array_equals(result.value, new Uint8Array([0x01]), 'value');
68 const enqueuedChunk = new Uint8Array([0x01]);
89 assert_typed_array_equals(view1, new Uint8Array([0x01]), 'reader1 value');
90 assert_typed_array_equals(view2, new Uint8Array([0x01]), 'reader2 value');
115 const buffer = new Uint8Array([42, 42, 42]).buffer;
118 const result = await reader1.read(new Uint8Array(buffer, 0, 1));
120 assert_typed_array_equals(result.value, new Uint8Array([0x01, 42, 42]).subarray(0, 1), 'value');
126 assert_typed_array_equals(result.value, new Uint8Array([0x01]), 'value');
137 c.enqueue(new Uint8Array([0x01]));
138 c.enqueue(new Uint8Array([0x02]));
150 const result = await reader1.read(new Uint8Array(1));
152 assert_typed_array_equals(result.value, new Uint8Array([0x01]), 'first read from branch1');
156 const result = await reader1.read(new Uint8Array(1));
158 assert_typed_array_equals(result.value, new Uint8Array([0x02]), 'second read from branch1');
161 await promise_rejects_exactly(t, theError, reader1.read(new Uint8Array(1)));
162 await promise_rejects_exactly(t, theError, reader2.read(new Uint8Array(1)));
176 c.enqueue(new Uint8Array([0x01]));
177 c.enqueue(new Uint8Array([0x02]));
188 assert_typed_array_equals(chunks2[0], new Uint8Array([0x01]), 'first chunk from branch2');
189 assert_typed_array_equals(chunks2[1], new Uint8Array([0x02]), 'second chunk from branch2');
198 c.enqueue(new Uint8Array([0x01]));
199 c.enqueue(new Uint8Array([0x02]));
209 assert_typed_array_equals(chunks1[0], new Uint8Array([0x01]), 'first chunk from branch1');
210 assert_typed_array_equals(chunks1[1], new Uint8Array([0x02]), 'second chunk from branch1');
239 const read1 = await reader1.read(new Uint8Array(1));
312 promise_rejects_exactly(t, theError, reader1.read(new Uint8Array(1))),
313 promise_rejects_exactly(t, theError, reader2.read(new Uint8Array(1)))
336 controller.enqueue(new Uint8Array([0x01]));
338 const read1 = await reader1.read(new Uint8Array(1));
340 assert_typed_array_equals(read1.value, new Uint8Array([0x01]), 'first read() from branch1');
344 const read2 = await reader1.read(new Uint8Array(1));
373 promise_rejects_exactly(t, theError, reader1.read(new Uint8Array(1))),
396 controller.enqueue(new Uint8Array([0x01]));
402 reader1.read(new Uint8Array(1)),
403 reader2.read(new Uint8Array(1))
440 const read1 = reader.read(new Uint8Array(1));
469 const read1 = reader1.read(new Uint8Array(1));
470 const read2 = reader2.read(new Uint8Array(1));
495 const read1 = reader1.read(new Uint8Array([0x11]));
496 const read2 = reader2.read(new Uint8Array([0x22]));
523 const read1 = reader1.read(new Uint8Array([0x11]));
524 const read2 = reader2.read(new Uint8Array([0x22]));
557 const read1 = reader1.read(new Uint8Array([0x11]));
559 const read2 = reader2.read(new Uint8Array([0x22]));
565 assert_typed_array_equals(byobRequest1.view, new Uint8Array([0x11]), 'byobRequest1.view');
574 assert_typed_array_equals(byobRequest2.view, new Uint8Array([0x11]), 'byobRequest2.view');
604 const read1 = reader1.read(new Uint8Array([0x11]));
606 const read2 = reader2.read(new Uint8Array([0x22]));
612 assert_typed_array_equals(byobRequest1.view, new Uint8Array([0x11]), 'byobRequest1.view');
621 assert_typed_array_equals(byobRequest2.view, new Uint8Array([0x11]), 'byobRequest2.view');
642 const read1 = reader1.read(new Uint8Array([0x11]));
644 const read2 = reader2.read(new Uint8Array([0x22]));
648 …assert_typed_array_equals(rs.controller.byobRequest.view, new Uint8Array([0x11]), 'first byobReque…
656 …assert_typed_array_equals(rs.controller.byobRequest.view, new Uint8Array([0x11]), 'second byobRequ…
665 assert_typed_array_equals(result1.value, new Uint8Array([0x33]), 'first read() from branch1');
675 const read1 = reader1.read(new Uint8Array([0x11]));
677 const read2 = reader2.read(new Uint8Array([0x22]));
681 …assert_typed_array_equals(rs.controller.byobRequest.view, new Uint8Array([0x11]), 'first byobReque…
689 …assert_typed_array_equals(rs.controller.byobRequest.view, new Uint8Array([0x11]), 'second byobRequ…
698 assert_typed_array_equals(result2.value, new Uint8Array([0x33]), 'first read() from branch2');
711 c.enqueue(new Uint8Array([pullCount]));
718 const result1 = await reader1.read(new Uint8Array([0x11]));
720 assert_typed_array_equals(result1.value, new Uint8Array([0x1]), 'first read');
729 assert_typed_array_equals(result2.value, new Uint8Array([0x2]), 'second read');
744 c.enqueue(new Uint8Array([pullCount]));
753 assert_typed_array_equals(result1.value, new Uint8Array([0x1]), 'first read');
760 const result2 = await reader2.read(new Uint8Array([0x22]));
762 assert_typed_array_equals(result2.value, new Uint8Array([0x2]), 'second read');
778 const read2 = reader2.read(new Uint8Array([0x22]));
779 const read1 = reader1.read(new Uint8Array([0x11]));
784 assert_typed_array_equals(byobRequest.view, new Uint8Array([0x22]), 'first BYOB request');
790 assert_typed_array_equals(result1.value, new Uint8Array([0x1]), 'first read');
794 assert_typed_array_equals(result2.value, new Uint8Array([0x1]), 'second read');
807 const read2 = reader2.read(new Uint8Array([0x22]));
823 …assert_typed_array_equals(result2.value, new Uint8Array([0x22]).subarray(0, 0), 'read from branch2…
836 const read1 = reader1.read(new Uint8Array([0x11]));
852 …assert_typed_array_equals(result1.value, new Uint8Array([0x11]).subarray(0, 0), 'read from branch1…
862 const read1 = reader1.read(new Uint8Array([0x11]));
863 const read2 = reader2.read(new Uint8Array([0x22]));
868 assert_typed_array_equals(byobRequest.view, new Uint8Array([0x11]), 'first BYOB request');
877 assert_typed_array_equals(result1.value, new Uint8Array([0x11]).subarray(0, 0), 'first read');
881 assert_typed_array_equals(result2.value, new Uint8Array([0x22]).subarray(0, 0), 'second read');
894 rs.controller.enqueue(new Uint8Array([0x11]));
899 …assert_typed_array_equals(result1.value, new Uint8Array([0x11]), 'first chunk from branch1 should …
902 …assert_typed_array_equals(result2.value, new Uint8Array([0x11]), 'first chunk from branch2 should …
914 const branch1Reads = [reader1.read(new Uint8Array(1)), reader1.read(new Uint8Array(1))];
915 const branch2Reads = [reader2.read(new Uint8Array(1)), reader2.read(new Uint8Array(1))];
924 …assert_typed_array_equals(result1.value, new Uint8Array([0x11]), 'first chunk from branch1 should …
927 …assert_typed_array_equals(result2.value, new Uint8Array([0x11]), 'first chunk from branch2 should …
931 …assert_typed_array_equals(result3.value, new Uint8Array([0]).subarray(0, 0), 'second chunk from br…
934 …assert_typed_array_equals(result4.value, new Uint8Array([0]).subarray(0, 0), 'second chunk from br…