summaryrefslogtreecommitdiff
path: root/xfa/fgas/crt/cfgas_formatstring_unittest.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-06-06 15:47:59 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-06-06 19:59:48 +0000
commit7dee685df0309401ad37c30c49a56d8523d1f8bb (patch)
tree4d565976050e1414edaddb8ec13ac5f44b62c255 /xfa/fgas/crt/cfgas_formatstring_unittest.cpp
parentdb124cff7ebb0b751fe86ca447dbee31363a64be (diff)
downloadpdfium-7dee685df0309401ad37c30c49a56d8523d1f8bb.tar.xz
Convert CFGAS_FormatString to pointer out parameterschromium/3123
This CL changes all CFGAS_FormatString methods to use pointer out paramters instead of reference out parameters. Change-Id: Ic5b57f30e4be09233898b8f4e06f908a96afedc8 Reviewed-on: https://pdfium-review.googlesource.com/6272 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org>
Diffstat (limited to 'xfa/fgas/crt/cfgas_formatstring_unittest.cpp')
-rw-r--r--xfa/fgas/crt/cfgas_formatstring_unittest.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/xfa/fgas/crt/cfgas_formatstring_unittest.cpp b/xfa/fgas/crt/cfgas_formatstring_unittest.cpp
index d1adc383f4..4cf2a89025 100644
--- a/xfa/fgas/crt/cfgas_formatstring_unittest.cpp
+++ b/xfa/fgas/crt/cfgas_formatstring_unittest.cpp
@@ -105,8 +105,8 @@ TEST_F(CFGAS_FormatStringTest, DateFormat) {
for (size_t i = 0; i < FX_ArraySize(tests); ++i) {
CFX_WideString result;
EXPECT_TRUE(fmt(tests[i].locale)
- ->FormatDateTime(tests[i].input, tests[i].pattern, result,
- FX_DATETIMETYPE_Date));
+ ->FormatDateTime(tests[i].input, tests[i].pattern,
+ FX_DATETIMETYPE_Date, &result));
EXPECT_STREQ(tests[i].output, result.c_str()) << " TEST: " << i;
}
}
@@ -150,8 +150,8 @@ TEST_F(CFGAS_FormatStringTest, TimeFormat) {
for (size_t i = 0; i < FX_ArraySize(tests); ++i) {
CFX_WideString result;
EXPECT_TRUE(fmt(tests[i].locale)
- ->FormatDateTime(tests[i].input, tests[i].pattern, result,
- FX_DATETIMETYPE_Time));
+ ->FormatDateTime(tests[i].input, tests[i].pattern,
+ FX_DATETIMETYPE_Time, &result));
EXPECT_STREQ(tests[i].output, result.c_str()) << " TEST: " << i;
}
@@ -177,8 +177,8 @@ TEST_F(CFGAS_FormatStringTest, DateTimeFormat) {
for (size_t i = 0; i < FX_ArraySize(tests); ++i) {
CFX_WideString result;
EXPECT_TRUE(fmt(tests[i].locale)
- ->FormatDateTime(tests[i].input, tests[i].pattern, result,
- FX_DATETIMETYPE_TimeDate));
+ ->FormatDateTime(tests[i].input, tests[i].pattern,
+ FX_DATETIMETYPE_TimeDate, &result));
EXPECT_STREQ(tests[i].output, result.c_str()) << " TEST: " << i;
}
}
@@ -252,7 +252,7 @@ TEST_F(CFGAS_FormatStringTest, SplitFormatString) {
std::vector<CFX_WideString> results;
fmt(L"en")->SplitFormatString(
L"null{'No data'} | null{} | text{999*9999} | text{999*999*9999}",
- results);
+ &results);
EXPECT_EQ(4UL, results.size());
const wchar_t* patterns[] = {L"null{'No data'} ", L" null{} ",
@@ -287,7 +287,7 @@ TEST_F(CFGAS_FormatStringTest, NumParse) {
for (size_t i = 0; i < FX_ArraySize(tests); ++i) {
CFX_WideString result;
EXPECT_TRUE(fmt(tests[i].locale)
- ->ParseNum(tests[i].input, tests[i].pattern, result));
+ ->ParseNum(tests[i].input, tests[i].pattern, &result));
EXPECT_STREQ(tests[i].output, result.c_str()) << " TEST: " << i;
}
}
@@ -343,7 +343,7 @@ TEST_F(CFGAS_FormatStringTest, NumFormat) {
for (size_t i = 0; i < FX_ArraySize(tests); ++i) {
CFX_WideString result;
EXPECT_TRUE(fmt(tests[i].locale)
- ->FormatNum(tests[i].input, tests[i].pattern, result));
+ ->FormatNum(tests[i].input, tests[i].pattern, &result));
EXPECT_STREQ(tests[i].output, result.c_str()) << " TEST: " << i;
}
}
@@ -365,7 +365,7 @@ TEST_F(CFGAS_FormatStringTest, TextParse) {
for (size_t i = 0; i < FX_ArraySize(tests); ++i) {
CFX_WideString result;
EXPECT_TRUE(fmt(tests[i].locale)
- ->ParseText(tests[i].input, tests[i].pattern, result));
+ ->ParseText(tests[i].input, tests[i].pattern, &result));
EXPECT_STREQ(tests[i].output, result.c_str()) << " TEST: " << i;
}
}
@@ -373,7 +373,7 @@ TEST_F(CFGAS_FormatStringTest, TextParse) {
TEST_F(CFGAS_FormatStringTest, InvalidTextParse) {
// Input does not match mask.
CFX_WideString result;
- EXPECT_FALSE(fmt(L"en")->ParseText(L"123-4567-8", L"AAA-9999-X", result));
+ EXPECT_FALSE(fmt(L"en")->ParseText(L"123-4567-8", L"AAA-9999-X", &result));
}
TEST_F(CFGAS_FormatStringTest, TextFormat) {
@@ -390,7 +390,7 @@ TEST_F(CFGAS_FormatStringTest, TextFormat) {
for (size_t i = 0; i < FX_ArraySize(tests); ++i) {
CFX_WideString result;
EXPECT_TRUE(fmt(tests[i].locale)
- ->FormatText(tests[i].input, tests[i].pattern, result));
+ ->FormatText(tests[i].input, tests[i].pattern, &result));
EXPECT_STREQ(tests[i].output, result.c_str()) << " TEST: " << i;
}
}
@@ -420,7 +420,7 @@ TEST_F(CFGAS_FormatStringTest, NullFormat) {
for (size_t i = 0; i < FX_ArraySize(tests); ++i) {
CFX_WideString result;
- EXPECT_TRUE(fmt(tests[i].locale)->FormatNull(tests[i].pattern, result));
+ EXPECT_TRUE(fmt(tests[i].locale)->FormatNull(tests[i].pattern, &result));
EXPECT_STREQ(tests[i].output, result.c_str()) << " TEST: " << i;
}
}
@@ -458,7 +458,7 @@ TEST_F(CFGAS_FormatStringTest, ZeroFormat) {
CFX_WideString result;
EXPECT_TRUE(
fmt(tests[i].locale)
- ->FormatZero(/* tests[i].input,*/ tests[i].pattern, result));
+ ->FormatZero(/* tests[i].input,*/ tests[i].pattern, &result));
EXPECT_STREQ(tests[i].output, result.c_str()) << " TEST: " << i;
}
}