From 275e260a6cd4a8e506ba974feb85ebcd926c1739 Mon Sep 17 00:00:00 2001 From: Ryan Harrison Date: Mon, 18 Sep 2017 14:23:18 -0400 Subject: Convert string class names Automated using git grep & sed. Replace StringC classes with StringView classes. Remove the CFX_ prefix and put string classes in fxcrt namespace. Change AsStringC() to AsStringView(). Rename tests from TEST(fxcrt, *String*Foo) to TEST(*String*, Foo). Couple of tests needed to have their names regularlized. BUG=pdfium:894 Change-Id: I7ca038685c8d803795f3ed02545124f7a224c83d Reviewed-on: https://pdfium-review.googlesource.com/14151 Reviewed-by: Tom Sepez Commit-Queue: Ryan Harrison --- xfa/fgas/crt/cfgas_formatstring_unittest.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'xfa/fgas/crt/cfgas_formatstring_unittest.cpp') diff --git a/xfa/fgas/crt/cfgas_formatstring_unittest.cpp b/xfa/fgas/crt/cfgas_formatstring_unittest.cpp index 3adcedf7b2..b3d42f655e 100644 --- a/xfa/fgas/crt/cfgas_formatstring_unittest.cpp +++ b/xfa/fgas/crt/cfgas_formatstring_unittest.cpp @@ -43,7 +43,7 @@ class CFGAS_FormatStringTest : public testing::Test { // Note, this re-creates the fmt on each call. If you need to multiple // times store it locally. - CFGAS_FormatString* fmt(const CFX_WideString& locale) { + CFGAS_FormatString* fmt(const WideString& locale) { mgr_ = pdfium::MakeUnique(nullptr, locale); fmt_ = pdfium::MakeUnique(mgr_.get()); return fmt_.get(); @@ -112,7 +112,7 @@ TEST_F(CFGAS_FormatStringTest, DateFormat) { // of DDD, DDDD, MMM, MMMM, E, e, gg, YYY, YYYYY. for (size_t i = 0; i < FX_ArraySize(tests); ++i) { - CFX_WideString result; + WideString result; EXPECT_TRUE(fmt(tests[i].locale) ->FormatDateTime(tests[i].input, tests[i].pattern, FX_DATETIMETYPE_Date, &result)); @@ -161,7 +161,7 @@ TEST_F(CFGAS_FormatStringTest, TimeFormat) { SetTZ("UTC+2"); for (size_t i = 0; i < FX_ArraySize(tests); ++i) { - CFX_WideString result; + WideString result; EXPECT_TRUE(fmt(tests[i].locale) ->FormatDateTime(tests[i].input, tests[i].pattern, FX_DATETIMETYPE_Time, &result)); @@ -191,7 +191,7 @@ TEST_F(CFGAS_FormatStringTest, DateTimeFormat) { L"At 10:30 GMT on Jul 16, 1999"}}; for (size_t i = 0; i < FX_ArraySize(tests); ++i) { - CFX_WideString result; + WideString result; EXPECT_TRUE(fmt(tests[i].locale) ->FormatDateTime(tests[i].input, tests[i].pattern, FX_DATETIMETYPE_TimeDate, &result)); @@ -288,7 +288,7 @@ TEST_F(CFGAS_FormatStringTest, DateParse) { // } TEST_F(CFGAS_FormatStringTest, SplitFormatString) { - std::vector results; + std::vector results; fmt(L"en")->SplitFormatString( L"null{'No data'} | null{} | text{999*9999} | text{999*999*9999}", &results); @@ -416,7 +416,7 @@ TEST_F(CFGAS_FormatStringTest, NumParse) { }; for (size_t i = 0; i < FX_ArraySize(tests); ++i) { - CFX_WideString result; + WideString result; EXPECT_TRUE(fmt(tests[i].locale) ->ParseNum(tests[i].input, tests[i].pattern, &result)) << " TEST: " << i; @@ -512,7 +512,7 @@ TEST_F(CFGAS_FormatStringTest, NumFormat) { }; for (size_t i = 0; i < FX_ArraySize(tests); ++i) { - CFX_WideString result; + WideString result; EXPECT_TRUE(fmt(tests[i].locale) ->FormatNum(tests[i].input, tests[i].pattern, &result)) << " TEST: " << i; @@ -538,7 +538,7 @@ TEST_F(CFGAS_FormatStringTest, TextParse) { {L"en", L"A1C-1234-D text", L"000-9999-X 'text'", L"A1C1234D"}}; for (size_t i = 0; i < FX_ArraySize(tests); ++i) { - CFX_WideString result; + WideString result; EXPECT_TRUE(fmt(tests[i].locale) ->ParseText(tests[i].input, tests[i].pattern, &result)); EXPECT_STREQ(tests[i].output, result.c_str()) << " TEST: " << i; @@ -547,7 +547,7 @@ TEST_F(CFGAS_FormatStringTest, TextParse) { TEST_F(CFGAS_FormatStringTest, InvalidTextParse) { // Input does not match mask. - CFX_WideString result; + WideString result; EXPECT_FALSE(fmt(L"en")->ParseText(L"123-4567-8", L"AAA-9999-X", &result)); } @@ -568,7 +568,7 @@ TEST_F(CFGAS_FormatStringTest, TextFormat) { }; for (size_t i = 0; i < FX_ArraySize(tests); ++i) { - CFX_WideString result; + WideString result; EXPECT_TRUE(fmt(tests[i].locale) ->FormatText(tests[i].input, tests[i].pattern, &result)); EXPECT_STREQ(tests[i].output, result.c_str()) << " TEST: " << i; @@ -599,7 +599,7 @@ TEST_F(CFGAS_FormatStringTest, NullFormat) { } tests[] = {{L"en", L"null{'n/a'}", L"n/a"}, {L"en", L"null{}", L""}}; for (size_t i = 0; i < FX_ArraySize(tests); ++i) { - CFX_WideString result; + WideString result; EXPECT_TRUE(fmt(tests[i].locale)->FormatNull(tests[i].pattern, &result)); EXPECT_STREQ(tests[i].output, result.c_str()) << " TEST: " << i; } @@ -635,7 +635,7 @@ TEST_F(CFGAS_FormatStringTest, ZeroFormat) { {L"en", L"0", L"zero{}", L""}}; for (size_t i = 0; i < FX_ArraySize(tests); ++i) { - CFX_WideString result; + WideString result; EXPECT_TRUE( fmt(tests[i].locale) ->FormatZero(/* tests[i].input,*/ tests[i].pattern, &result)); -- cgit v1.2.3