summaryrefslogtreecommitdiff
path: root/xfa/fgas/layout/fgas_rtfbreak_unittest.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2017-04-17 15:38:19 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-04-18 17:17:36 +0000
commit3c3e271ea9fd19dd535a74b5546b27e3e82dcb81 (patch)
treee73049f2d18718da9ff8d42b46f31009c5e6e887 /xfa/fgas/layout/fgas_rtfbreak_unittest.cpp
parent94c5e25840046b7bf976d2d568e19ad63b656ade (diff)
downloadpdfium-3c3e271ea9fd19dd535a74b5546b27e3e82dcb81.tar.xz
Use Byte/WideString iterators
Change-Id: I85c8423c177fd7ecd5da90ef89419efc0f9cf44b Reviewed-on: https://pdfium-review.googlesource.com/4262 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'xfa/fgas/layout/fgas_rtfbreak_unittest.cpp')
-rw-r--r--xfa/fgas/layout/fgas_rtfbreak_unittest.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/xfa/fgas/layout/fgas_rtfbreak_unittest.cpp b/xfa/fgas/layout/fgas_rtfbreak_unittest.cpp
index d84621a595..cc3c86cadb 100644
--- a/xfa/fgas/layout/fgas_rtfbreak_unittest.cpp
+++ b/xfa/fgas/layout/fgas_rtfbreak_unittest.cpp
@@ -53,8 +53,8 @@ TEST_F(RTFBreakTest, AddChars) {
auto b = CreateBreak(FX_LAYOUTSTYLE_ExpandTab);
CFX_WideString str(L"Input String.");
- for (int32_t i = 0; i < str.GetLength(); i++)
- EXPECT_EQ(CFX_BreakType::None, b->AppendChar(str.GetAt(i)));
+ for (const auto& c : str)
+ EXPECT_EQ(CFX_BreakType::None, b->AppendChar(c));
EXPECT_EQ(CFX_BreakType::Paragraph, b->AppendChar(L'\n'));
ASSERT_EQ(1, b->CountBreakPieces());
@@ -65,8 +65,8 @@ TEST_F(RTFBreakTest, AddChars) {
EXPECT_EQ(0, b->GetCurrentLineForTesting()->GetLineEnd());
str = L"Second str.";
- for (int32_t i = 0; i < str.GetLength(); i++)
- EXPECT_EQ(CFX_BreakType::None, b->AppendChar(str.GetAt(i)));
+ for (const auto& c : str)
+ EXPECT_EQ(CFX_BreakType::None, b->AppendChar(c));
// Force the end of the break at the end of the string.
b->EndBreak(CFX_BreakType::Paragraph);