This commit is contained in:
saqib mir
2026-07-23 12:15:20 +05:30
parent 185cc03df7
commit 626156642e
+18
View File
@@ -436,6 +436,24 @@ TEST(ImageXObjectVerification, JpegLogoAndPhotoDecodeAndMatchPdfiumRender) {
QPDF qpdf;
auto objects = buildFirstPageObjects(qpdf, pdf);
// DEBUG: Parse again just to print
{
Lexer lexer(content);
auto tokens = lexer.tokenize();
ContentParser parser(tokens);
auto operations = parser.parse();
for (const auto& op : operations) {
std::cout << "DEBUG OP: " << op.op << " operands: ";
for (const auto& operand : op.operands) {
if (operand->type == AstNodeType::Number) std::cout << operand->numberValue << " ";
else if (operand->type == AstNodeType::Name) std::cout << "/" << operand->stringValue << " ";
else std::cout << "[type " << (int)operand->type << "] ";
}
std::cout << "\n";
}
}
auto images = imageObjects(objects);
ASSERT_EQ(images.size(), 2u);