summaryrefslogtreecommitdiff
path: root/core/fpdfdoc/doc_basic_unittest.cpp
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-04-01 10:23:04 -0700
committerCommit bot <commit-bot@chromium.org>2016-04-01 10:23:05 -0700
commit9f2970caec897c40b91bd010c04dfe1f19d11108 (patch)
treed0a289939b3b6be3fe19a412b134eeb467672db2 /core/fpdfdoc/doc_basic_unittest.cpp
parentdf4bc596c64fb848647c670be66a29ea0861b4f4 (diff)
downloadpdfium-9f2970caec897c40b91bd010c04dfe1f19d11108.tar.xz
Remove CFX_{Byte,Wide}String::Equal in favor of "==".
Makes the code slightly cleaner. Review URL: https://codereview.chromium.org/1846083002
Diffstat (limited to 'core/fpdfdoc/doc_basic_unittest.cpp')
-rw-r--r--core/fpdfdoc/doc_basic_unittest.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/core/fpdfdoc/doc_basic_unittest.cpp b/core/fpdfdoc/doc_basic_unittest.cpp
index a84f334ebb..0ab70c9304 100644
--- a/core/fpdfdoc/doc_basic_unittest.cpp
+++ b/core/fpdfdoc/doc_basic_unittest.cpp
@@ -52,10 +52,10 @@ TEST(doc_basic_filespec, EncodeDecodeFileName) {
};
for (const auto& data : test_data) {
CFX_WideString encoded_str = CPDF_FileSpec::EncodeFileName(data.input);
- EXPECT_TRUE(encoded_str.Equal(data.expected));
+ EXPECT_TRUE(encoded_str == data.expected);
// DecodeFileName is the reverse procedure of EncodeFileName.
CFX_WideString decoded_str = CPDF_FileSpec::DecodeFileName(data.expected);
- EXPECT_TRUE(decoded_str.Equal(data.input));
+ EXPECT_TRUE(decoded_str == data.input);
}
}
@@ -78,7 +78,7 @@ TEST(doc_basic_filespec, GetFileName) {
CPDF_FileSpec file_spec(str_obj.get());
CFX_WideString file_name;
EXPECT_TRUE(file_spec.GetFileName(&file_name));
- EXPECT_TRUE(file_name.Equal(test_data.expected));
+ EXPECT_TRUE(file_name == test_data.expected);
}
{
// Dictionary object.
@@ -111,14 +111,14 @@ TEST(doc_basic_filespec, GetFileName) {
for (int i = 0; i < 5; ++i) {
dict_obj->SetAt(keywords[i], new CPDF_String(test_data[i].input));
EXPECT_TRUE(file_spec.GetFileName(&file_name));
- EXPECT_TRUE(file_name.Equal(test_data[i].expected));
+ EXPECT_TRUE(file_name == test_data[i].expected);
}
// With all the former fields and 'FS' field suggests 'URL' type.
dict_obj->SetAtString("FS", "URL");
EXPECT_TRUE(file_spec.GetFileName(&file_name));
// Url string is not decoded.
- EXPECT_TRUE(file_name.Equal(test_data[4].input));
+ EXPECT_TRUE(file_name == test_data[4].input);
}
{
// Invalid object.
@@ -152,7 +152,7 @@ TEST(doc_basic_filespec, SetFileName) {
// Check we can get the file name back.
CFX_WideString file_name;
EXPECT_TRUE(file_spec1.GetFileName(&file_name));
- EXPECT_TRUE(file_name.Equal(test_data.input));
+ EXPECT_TRUE(file_name == test_data.input);
// Dictionary object.
ScopedDict dict_obj(new CPDF_Dictionary);
@@ -160,10 +160,10 @@ TEST(doc_basic_filespec, SetFileName) {
file_spec2.SetFileName(test_data.input);
// Check internal object value.
file_name = dict_obj->GetUnicodeTextBy("F");
- EXPECT_TRUE(file_name.Equal(test_data.expected));
+ EXPECT_TRUE(file_name == test_data.expected);
file_name = dict_obj->GetUnicodeTextBy("UF");
- EXPECT_TRUE(file_name.Equal(test_data.expected));
+ EXPECT_TRUE(file_name == test_data.expected);
// Check we can get the file name back.
EXPECT_TRUE(file_spec2.GetFileName(&file_name));
- EXPECT_TRUE(file_name.Equal(test_data.input));
+ EXPECT_TRUE(file_name == test_data.input);
}