From 179bebb9a14dfd3ba91e9e068d4d436657a7c780 Mon Sep 17 00:00:00 2001 From: dsinclair Date: Tue, 5 Apr 2016 11:02:18 -0700 Subject: Rename GetCStr and GetPtr to match CFX_ByteString. This CL updates CFX_ByteStringC to use the more common c_str and raw_str instead of GetCStr and GetPtr. Review URL: https://codereview.chromium.org/1857713003 --- core/fpdfapi/fpdf_parser/cpdf_object_unittest.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'core/fpdfapi/fpdf_parser/cpdf_object_unittest.cpp') diff --git a/core/fpdfapi/fpdf_parser/cpdf_object_unittest.cpp b/core/fpdfapi/fpdf_parser/cpdf_object_unittest.cpp index 6c1738d5a6..17fd891d1b 100644 --- a/core/fpdfapi/fpdf_parser/cpdf_object_unittest.cpp +++ b/core/fpdfapi/fpdf_parser/cpdf_object_unittest.cpp @@ -34,7 +34,7 @@ void TestArrayAccessors(const CPDF_Array* arr, CPDF_Dictionary* dict_val, CPDF_Stream* stream_val) { EXPECT_STREQ(str_val, arr->GetStringAt(index).c_str()); - EXPECT_STREQ(const_str_val, arr->GetConstStringAt(index).GetCStr()); + EXPECT_STREQ(const_str_val, arr->GetConstStringAt(index).c_str()); EXPECT_EQ(int_val, arr->GetIntegerAt(index)); EXPECT_EQ(float_val, arr->GetNumberAt(index)); EXPECT_EQ(float_val, arr->GetFloatAt(index)); @@ -207,10 +207,10 @@ TEST_F(PDFObjectsTest, GetConstString) { for (size_t i = 0; i < m_DirectObjs.size(); ++i) { if (!direct_obj_results[i]) { EXPECT_EQ(direct_obj_results[i], - m_DirectObjs[i]->GetConstString().GetCStr()); + m_DirectObjs[i]->GetConstString().c_str()); } else { EXPECT_STREQ(direct_obj_results[i], - m_DirectObjs[i]->GetConstString().GetCStr()); + m_DirectObjs[i]->GetConstString().c_str()); } } // Check indirect references. @@ -218,10 +218,10 @@ TEST_F(PDFObjectsTest, GetConstString) { nullptr, nullptr, nullptr}; for (size_t i = 0; i < m_RefObjs.size(); ++i) { if (!indirect_obj_results[i]) { - EXPECT_EQ(nullptr, m_RefObjs[i]->GetConstString().GetCStr()); + EXPECT_EQ(nullptr, m_RefObjs[i]->GetConstString().c_str()); } else { EXPECT_STREQ(indirect_obj_results[i], - m_RefObjs[i]->GetConstString().GetCStr()); + m_RefObjs[i]->GetConstString().c_str()); } } } @@ -677,7 +677,7 @@ TEST(PDFArrayTest, GetTypeAt) { 0, 0, 0, 0, 0, 0, 0}; for (size_t i = 0; i < arr->GetCount(); ++i) { EXPECT_STREQ(expected_str[i], arr->GetStringAt(i).c_str()); - EXPECT_STREQ(expected_cstr[i], arr->GetConstStringAt(i).GetCStr()); + EXPECT_STREQ(expected_cstr[i], arr->GetConstStringAt(i).c_str()); EXPECT_EQ(expected_int[i], arr->GetIntegerAt(i)); EXPECT_EQ(expected_float[i], arr->GetNumberAt(i)); EXPECT_EQ(expected_float[i], arr->GetFloatAt(i)); -- cgit v1.2.3