diff options
author | Lei Zhang <thestig@chromium.org> | 2018-01-11 14:28:01 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-01-11 14:28:01 +0000 |
commit | 762502141cc93fb22fbfcf536d81752c4c6886aa (patch) | |
tree | 4157373e655fb6c3e2166ad46e45cf68ca349c7a /fpdfsdk/fpdftext_embeddertest.cpp | |
parent | 188b2e0333d161ffbac7c896f443b886b113b26a (diff) | |
download | pdfium-762502141cc93fb22fbfcf536d81752c4c6886aa.tar.xz |
Change FPDFText_GetRect() to return a boolean.
BUG=pdfium:858
Change-Id: Idc9900fe6f85b1fef06c97f5023653f77156d410
Reviewed-on: https://pdfium-review.googlesource.com/22730
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fpdfsdk/fpdftext_embeddertest.cpp')
-rw-r--r-- | fpdfsdk/fpdftext_embeddertest.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fpdfsdk/fpdftext_embeddertest.cpp b/fpdfsdk/fpdftext_embeddertest.cpp index 6885eb0f75..a9637be5df 100644 --- a/fpdfsdk/fpdftext_embeddertest.cpp +++ b/fpdfsdk/fpdftext_embeddertest.cpp @@ -115,7 +115,7 @@ TEST_F(FPDFTextEmbeddertest, Text) { right = 0.0; bottom = 0.0; top = 0.0; - FPDFText_GetRect(textpage, 1, &left, &top, &right, &bottom); + EXPECT_TRUE(FPDFText_GetRect(textpage, 1, &left, &top, &right, &bottom)); EXPECT_NEAR(20.847, left, 0.001); EXPECT_NEAR(135.167, right, 0.001); EXPECT_NEAR(96.655, bottom, 0.001); @@ -126,7 +126,7 @@ TEST_F(FPDFTextEmbeddertest, Text) { right = -1.0; bottom = -1.0; top = -1.0; - FPDFText_GetRect(textpage, -1, &left, &top, &right, &bottom); + EXPECT_FALSE(FPDFText_GetRect(textpage, -1, &left, &top, &right, &bottom)); EXPECT_EQ(0.0, left); EXPECT_EQ(0.0, right); EXPECT_EQ(0.0, bottom); @@ -136,7 +136,7 @@ TEST_F(FPDFTextEmbeddertest, Text) { right = -2.0; bottom = -2.0; top = -2.0; - FPDFText_GetRect(textpage, 2, &left, &top, &right, &bottom); + EXPECT_FALSE(FPDFText_GetRect(textpage, 2, &left, &top, &right, &bottom)); EXPECT_EQ(0.0, left); EXPECT_EQ(0.0, right); EXPECT_EQ(0.0, bottom); |