diff options
author | Ryan Harrison <rharrison@chromium.org> | 2017-09-18 14:23:18 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-09-18 18:40:16 +0000 |
commit | 275e260a6cd4a8e506ba974feb85ebcd926c1739 (patch) | |
tree | 2029b9158ec044764ceff122fe5fb5d0a3f123d1 /core/fxcrt/cfx_string_pool_template_unittest.cpp | |
parent | 450fbeaaabf1ab340c1018de2e58f1950657517e (diff) | |
download | pdfium-275e260a6cd4a8e506ba974feb85ebcd926c1739.tar.xz |
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 <tsepez@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'core/fxcrt/cfx_string_pool_template_unittest.cpp')
-rw-r--r-- | core/fxcrt/cfx_string_pool_template_unittest.cpp | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/core/fxcrt/cfx_string_pool_template_unittest.cpp b/core/fxcrt/cfx_string_pool_template_unittest.cpp index a4e603c8fa..9a5ac5d3ed 100644 --- a/core/fxcrt/cfx_string_pool_template_unittest.cpp +++ b/core/fxcrt/cfx_string_pool_template_unittest.cpp @@ -7,22 +7,22 @@ #include "testing/gtest/include/gtest/gtest.h" TEST(fxcrt, ByteStringPool) { - CFX_ByteStringPool pool; + ByteStringPool pool; - CFX_ByteString null1; - CFX_ByteString null2; - CFX_ByteString goats1("goats"); - CFX_ByteString goats2("goats"); + ByteString null1; + ByteString null2; + ByteString goats1("goats"); + ByteString goats2("goats"); // Underlying storage, if non-null, is not shared. EXPECT_EQ(nullptr, null1.m_pData.Get()); EXPECT_EQ(nullptr, null2.m_pData.Get()); EXPECT_NE(goats1.m_pData, goats2.m_pData); - CFX_ByteString interned_null1 = pool.Intern(null1); - CFX_ByteString interned_null2 = pool.Intern(null2); - CFX_ByteString interned_goats1 = pool.Intern(goats1); - CFX_ByteString interned_goats2 = pool.Intern(goats2); + ByteString interned_null1 = pool.Intern(null1); + ByteString interned_null2 = pool.Intern(null2); + ByteString interned_goats1 = pool.Intern(goats1); + ByteString interned_goats2 = pool.Intern(goats2); // Strings are logically equal after being interned. EXPECT_EQ(null1, interned_null1); @@ -37,10 +37,10 @@ TEST(fxcrt, ByteStringPool) { EXPECT_EQ(goats1.m_pData, interned_goats2.m_pData); pool.Clear(); - CFX_ByteString reinterned_null2 = pool.Intern(null2); - CFX_ByteString reinterned_null1 = pool.Intern(null2); - CFX_ByteString reinterned_goats2 = pool.Intern(goats2); - CFX_ByteString reinterned_goats1 = pool.Intern(goats2); + ByteString reinterned_null2 = pool.Intern(null2); + ByteString reinterned_null1 = pool.Intern(null2); + ByteString reinterned_goats2 = pool.Intern(goats2); + ByteString reinterned_goats1 = pool.Intern(goats2); // After clearing pool, storage was re-interned using second strings. EXPECT_EQ(nullptr, interned_null1.m_pData.Get()); @@ -50,22 +50,22 @@ TEST(fxcrt, ByteStringPool) { } TEST(fxcrt, WideStringPool) { - CFX_WideStringPool pool; + WideStringPool pool; - CFX_WideString null1; - CFX_WideString null2; - CFX_WideString goats1(L"goats"); - CFX_WideString goats2(L"goats"); + WideString null1; + WideString null2; + WideString goats1(L"goats"); + WideString goats2(L"goats"); // Underlying storage, if non-null, is not shared. EXPECT_EQ(nullptr, null1.m_pData.Get()); EXPECT_EQ(nullptr, null2.m_pData.Get()); EXPECT_NE(goats1.m_pData, goats2.m_pData); - CFX_WideString interned_null1 = pool.Intern(null1); - CFX_WideString interned_null2 = pool.Intern(null2); - CFX_WideString interned_goats1 = pool.Intern(goats1); - CFX_WideString interned_goats2 = pool.Intern(goats2); + WideString interned_null1 = pool.Intern(null1); + WideString interned_null2 = pool.Intern(null2); + WideString interned_goats1 = pool.Intern(goats1); + WideString interned_goats2 = pool.Intern(goats2); // Strings are logically equal after being interned. EXPECT_EQ(null1, interned_null1); @@ -80,10 +80,10 @@ TEST(fxcrt, WideStringPool) { EXPECT_EQ(goats1.m_pData, interned_goats2.m_pData); pool.Clear(); - CFX_WideString reinterned_null2 = pool.Intern(null2); - CFX_WideString reinterned_null1 = pool.Intern(null2); - CFX_WideString reinterned_goats2 = pool.Intern(goats2); - CFX_WideString reinterned_goats1 = pool.Intern(goats2); + WideString reinterned_null2 = pool.Intern(null2); + WideString reinterned_null1 = pool.Intern(null2); + WideString reinterned_goats2 = pool.Intern(goats2); + WideString reinterned_goats1 = pool.Intern(goats2); // After clearing pool, storage was re-interned using second strings. EXPECT_EQ(nullptr, interned_null1.m_pData.Get()); |