aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar Hal Canary <halcanary@google.com>2017-10-03 09:38:43 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-10-10 16:41:13 +0000
commitc5b94988915920ed359eecec34d4fbd6bdc0a3fd (patch)
treec735d56ca0735d5046e0540d6258e17773f0a805 /tests
parent24f0a354ac618c17a71e4dac80dd0ad370ed14eb (diff)
SkPDF: consolidate two functions in SkPDFObjNumMap
Change-Id: Id815920e664ba986258867b7c35a7618a6927b0f Reviewed-on: https://skia-review.googlesource.com/54360 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/PDFPrimitivesTest.cpp12
1 files changed, 6 insertions, 6 deletions
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<SkPDFArray> a2(new SkPDFArray);
sk_sp<SkPDFArray> 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<SkPDFArray> 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<SkPDFArray> 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));