[PDF] Fix bug in catalog substitution.
Review URL: http://codereview.appspot.com/4816051
git-svn-id: http://skia.googlecode.com/svn/trunk@1955 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/tests/PDFPrimitivesTest.cpp b/tests/PDFPrimitivesTest.cpp
index b3f5105..8dabaf5 100644
--- a/tests/PDFPrimitivesTest.cpp
+++ b/tests/PDFPrimitivesTest.cpp
@@ -227,6 +227,11 @@
proxy->emit(&buffer, &catalog, false);
catalog.emitSubstituteResources(&buffer, false);
+ char objectResult[] = "2 0 obj\n<</Value 33\n>>\nendobj\n";
+ REPORTER_ASSERT(
+ reporter,
+ catalog.setFileOffset(proxy.get(), 0) == strlen(objectResult));
+
char expectedResult[] =
"<</Value 33\n>>1 0 obj\n<</InnerValue 44\n>>\nendobj\n";
REPORTER_ASSERT(reporter, buffer.getOffset() == strlen(expectedResult));