Commit f6367bbada59a150171b7e89f73e4a042ac4d49a
1 parent
5489f1d8
Dangling ref test: show new object ID
Showing
3 changed files
with
6 additions
and
2 deletions
qpdf/qtest/qpdf/dangling-refs-dangling.out
qpdf/qtest/qpdf/minimal-dangling.out
qpdf/test_driver.cc
| ... | ... | @@ -2062,8 +2062,10 @@ test_53(QPDF& pdf, char const* arg2) |
| 2062 | 2062 | { |
| 2063 | 2063 | // Test get all objects and dangling ref handling |
| 2064 | 2064 | QPDFObjectHandle root = pdf.getRoot(); |
| 2065 | - root.replaceKey( | |
| 2066 | - "/Q1", pdf.makeIndirectObject(QPDFObjectHandle::newString("potato"))); | |
| 2065 | + auto new_obj = | |
| 2066 | + pdf.makeIndirectObject(QPDFObjectHandle::newString("potato")); | |
| 2067 | + root.replaceKey("/Q1", new_obj); | |
| 2068 | + std::cout << "new object: " << new_obj.unparse() << std::endl; | |
| 2067 | 2069 | std::cout << "all objects" << std::endl; |
| 2068 | 2070 | for (auto& obj: pdf.getAllObjects()) { |
| 2069 | 2071 | std::cout << obj.unparse() << std::endl; | ... | ... |