Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3870)

Unified Diff: core/fpdfapi/fpdf_parser/cpdf_object_unittest.cpp

Issue 1857713003: Rename GetCStr and GetPtr to match CFX_ByteString (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Rebase to master Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/fpdfapi/fpdf_page/cpdf_generalstatedata.cpp ('k') | core/fpdfapi/fpdf_parser/cpdf_simple_parser.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: 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 6c1738d5a652a8e30327dcf5ec5cd733ada5771b..17fd891d1b70e4f376e92360c1e8d8e82f7902d0 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));
« no previous file with comments | « core/fpdfapi/fpdf_page/cpdf_generalstatedata.cpp ('k') | core/fpdfapi/fpdf_parser/cpdf_simple_parser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698