17 auto stream = pdfium::MakeRetain<CPDF_Stream>();
18 stream->InitStreamFromFile(
19 pdfium::MakeRetain<InvalidSeekableReadStream>(1024),
20 pdfium::MakeRetain<CPDF_Dictionary>());
21 auto stream_acc = pdfium::MakeRetain<CPDF_StreamAcc>(
std::move(stream));
22 stream_acc->LoadAllDataRaw();
23 EXPECT_TRUE(stream_acc->GetSpan().empty());
29 constexpr uint8_t kData[] = {
'a',
'b',
'c'};
30 auto stream = pdfium::MakeRetain<CPDF_Stream>();
31 stream->SetData(kData);
32 auto stream_acc = pdfium::MakeRetain<CPDF_StreamAcc>(stream);
33 stream_acc->LoadAllDataRaw();
35 auto span = stream_acc->GetSpan();
37 std::equal(
std::begin(kData),
std::end(kData), span.begin(), span.end()));