34 const char data[] =
"\xEF\xBB\xBF*\xC2\xA2*";
35 auto proxy_stream = pdfium::MakeRetain<CFX_SeekableStreamProxy>(
36 pdfium::MakeRetain<CFX_ReadOnlySpanStream>(pdfium::make_span(
37 reinterpret_cast<
const uint8_t*>(data),
sizeof(data) - 1)));
40 EXPECT_EQ(3u, proxy_stream->ReadBlock(buffer,
std::size(buffer)));
41 EXPECT_EQ(L'*', buffer[0]);
42 EXPECT_EQ(L'\u00A2', buffer[1]);
43 EXPECT_EQ(L'*', buffer[2]);
47 const char data[] =
"\xFF\xFE\x41\x00\x42\x01";
48 auto proxy_stream = pdfium::MakeRetain<CFX_SeekableStreamProxy>(
49 pdfium::MakeRetain<CFX_ReadOnlySpanStream>(pdfium::make_span(
50 reinterpret_cast<
const uint8_t*>(data),
sizeof(data) - 1)));
53 EXPECT_EQ(2u, proxy_stream->ReadBlock(buffer,
std::size(buffer)));
54 EXPECT_EQ(L'A', buffer[0]);
55 EXPECT_EQ(L'\u0142', buffer[1]);
59 const char data[] =
"\xFE\xFF\x00\x41\x01\x42";
60 auto proxy_stream = pdfium::MakeRetain<CFX_SeekableStreamProxy>(
61 pdfium::MakeRetain<CFX_ReadOnlySpanStream>(pdfium::make_span(
62 reinterpret_cast<
const uint8_t*>(data),
sizeof(data) - 1)));
65 EXPECT_EQ(2u, proxy_stream->ReadBlock(buffer,
std::size(buffer)));
66 EXPECT_EQ(L'A', buffer[0]);
67 EXPECT_EQ(L'\u0142', buffer[1]);