summaryrefslogtreecommitdiff
path: root/core/fpdfapi/edit
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/edit')
-rw-r--r--core/fpdfapi/edit/cpdf_pagecontentgenerator_unittest.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/core/fpdfapi/edit/cpdf_pagecontentgenerator_unittest.cpp b/core/fpdfapi/edit/cpdf_pagecontentgenerator_unittest.cpp
index 62b10c9149..e9676b1115 100644
--- a/core/fpdfapi/edit/cpdf_pagecontentgenerator_unittest.cpp
+++ b/core/fpdfapi/edit/cpdf_pagecontentgenerator_unittest.cpp
@@ -186,8 +186,10 @@ TEST_F(CPDF_PageContentGeneratorTest, ProcessStandardText) {
std::ostringstream buf;
TestProcessText(&generator, &buf, pTextObj.get());
CFX_ByteString textString(buf);
- int firstResourceAt = textString.Find('/') + 1;
- int secondResourceAt = textString.ReverseFind('/') + 1;
+ FX_STRSIZE firstResourceAt = textString.Find('/') + 1;
+ FX_STRSIZE secondResourceAt = textString.ReverseFind('/') + 1;
+ EXPECT_NE(FX_STRNPOS, firstResourceAt);
+ EXPECT_NE(FX_STRNPOS, secondResourceAt);
CFX_ByteString firstString = textString.Left(firstResourceAt);
CFX_ByteString midString =
textString.Mid(firstResourceAt, secondResourceAt - firstResourceAt);
@@ -252,7 +254,8 @@ TEST_F(CPDF_PageContentGeneratorTest, ProcessText) {
}
CFX_ByteString textString(buf);
- int firstResourceAt = textString.Find('/') + 1;
+ FX_STRSIZE firstResourceAt = textString.Find('/') + 1;
+ EXPECT_NE(FX_STRNPOS, firstResourceAt);
CFX_ByteString firstString = textString.Left(firstResourceAt);
CFX_ByteString lastString =
textString.Right(textString.GetLength() - firstResourceAt);