From c5b94988915920ed359eecec34d4fbd6bdc0a3fd Mon Sep 17 00:00:00 2001 From: Hal Canary Date: Tue, 3 Oct 2017 09:38:43 -0400 Subject: SkPDF: consolidate two functions in SkPDFObjNumMap Change-Id: Id815920e664ba986258867b7c35a7618a6927b0f Reviewed-on: https://skia-review.googlesource.com/54360 Reviewed-by: Ben Wagner Commit-Queue: Hal Canary --- tests/PDFPrimitivesTest.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'tests') diff --git a/tests/PDFPrimitivesTest.cpp b/tests/PDFPrimitivesTest.cpp index ed74850437..8c6b03cebf 100644 --- a/tests/PDFPrimitivesTest.cpp +++ b/tests/PDFPrimitivesTest.cpp @@ -126,9 +126,9 @@ static void TestObjectNumberMap(skiatest::Reporter* reporter) { sk_sp a2(new SkPDFArray); sk_sp a3(new SkPDFArray); - objNumMap.addObject(a1.get()); - objNumMap.addObject(a2.get()); - objNumMap.addObject(a3.get()); + objNumMap.addObjectRecursively(a1.get()); + objNumMap.addObjectRecursively(a2.get()); + objNumMap.addObjectRecursively(a3.get()); // The objects should be numbered in the order they are added, // starting with 1. @@ -146,7 +146,7 @@ static void TestObjectRef(skiatest::Reporter* reporter) { a2->appendObjRef(a1); SkPDFObjNumMap catalog; - catalog.addObject(a1.get()); + catalog.addObjectRecursively(a1.get()); REPORTER_ASSERT(reporter, catalog.getObjectNumber(a1.get()) == 1); SkString result = emit_to_string(*a2, &catalog); @@ -265,7 +265,7 @@ static void TestPDFArray(skiatest::Reporter* reporter) { sk_sp referencedArray(new SkPDFArray); SkPDFObjNumMap catalog; - catalog.addObject(referencedArray.get()); + catalog.addObjectRecursively(referencedArray.get()); REPORTER_ASSERT(reporter, catalog.getObjectNumber( referencedArray.get()) == 1); array->appendObjRef(std::move(referencedArray)); @@ -329,7 +329,7 @@ static void TestPDFDict(skiatest::Reporter* reporter) { sk_sp referencedArray(new SkPDFArray); SkPDFObjNumMap catalog; - catalog.addObject(referencedArray.get()); + catalog.addObjectRecursively(referencedArray.get()); REPORTER_ASSERT(reporter, catalog.getObjectNumber( referencedArray.get()) == 1); dict->insertObjRef("n1", std::move(referencedArray)); -- cgit v1.2.3