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

Unified Diff: core/src/fxcrt/fx_basic_wstring_unittest.cpp

Issue 1127753002: Fix issues with != and == in fx_basic_wstring (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Missing & Created 5 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
« core/src/fxcrt/fx_basic_wstring.cpp ('K') | « core/src/fxcrt/fx_basic_wstring.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fxcrt/fx_basic_wstring_unittest.cpp
diff --git a/core/src/fxcrt/fx_basic_wstring_unittest.cpp b/core/src/fxcrt/fx_basic_wstring_unittest.cpp
index 16d71cb5b8e700f6a4c4643e6b245186dd31a2c6..3b15006d655f8019f6906406d8147d09bd271af7 100644
--- a/core/src/fxcrt/fx_basic_wstring_unittest.cpp
+++ b/core/src/fxcrt/fx_basic_wstring_unittest.cpp
@@ -83,11 +83,7 @@ TEST(fxcrt, WideStringOperatorEQ) {
const wchar_t* c_string_same1 = L"hello";
ASSERT_TRUE(wide_string == c_string_same1);
-#if 0
- // TODO(tsepez): Missing operator - there's a prototype but no actual
- // implementation (at least we already removed implicit c_str() casting).
ASSERT_TRUE(c_string_same1 == wide_string);
-#endif
const wchar_t* c_string1 = L"he";
const wchar_t* c_string2 = L"hellp";
@@ -95,12 +91,9 @@ TEST(fxcrt, WideStringOperatorEQ) {
ASSERT_FALSE(wide_string == c_string1);
ASSERT_FALSE(wide_string == c_string2);
ASSERT_FALSE(wide_string == c_string3);
-#if 0
- // See above TODO.
ASSERT_FALSE(c_string1 == wide_string);
ASSERT_FALSE(c_string2 == wide_string);
ASSERT_FALSE(c_string3 == wide_string);
-#endif
}
TEST(fxcrt, WideStringOperatorNE) {
@@ -141,22 +134,18 @@ TEST(fxcrt, WideStringOperatorNE) {
const wchar_t* c_string_same1 = L"hello";
ASSERT_FALSE(wide_string != c_string_same1);
-#if 0
- // See above TODO.
ASSERT_FALSE(c_string_same1 != wide_string);
-#endif
+
const wchar_t* c_string1 = L"he";
const wchar_t* c_string2 = L"hellp";
const wchar_t* c_string3 = L"hellod";
ASSERT_TRUE(wide_string != c_string1);
ASSERT_TRUE(wide_string != c_string2);
ASSERT_TRUE(wide_string != c_string3);
-#if 0
- // See above TODO.
+
ASSERT_TRUE(c_string1 != wide_string);
ASSERT_TRUE(c_string2 != wide_string);
ASSERT_TRUE(c_string3 != wide_string);
-#endif
}
#define ByteStringLiteral(str) CFX_ByteString(FX_BSTRC(str))
@@ -256,8 +245,6 @@ TEST(fxcrt, WideStringCOperatorEQ) {
ASSERT_FALSE(wide_string2 == wide_string_c);
ASSERT_FALSE(wide_string3 == wide_string_c);
-#if 0
- // TODO(tsepez): ambiguos overload prevents compilation
const wchar_t* c_string_same1 = L"hello";
ASSERT_TRUE(wide_string_c == c_string_same1);
ASSERT_TRUE(c_string_same1 == wide_string_c);
@@ -272,7 +259,6 @@ TEST(fxcrt, WideStringCOperatorEQ) {
ASSERT_FALSE(c_string1 == wide_string_c);
ASSERT_FALSE(c_string2 == wide_string_c);
ASSERT_FALSE(c_string3 == wide_string_c);
-#endif
}
TEST(fxcrt, WideStringCOperatorNE) {
@@ -311,8 +297,6 @@ TEST(fxcrt, WideStringCOperatorNE) {
ASSERT_TRUE(wide_string2 != wide_string_c);
ASSERT_TRUE(wide_string3 != wide_string_c);
-#if 0
- // See above TODO.
const wchar_t* c_string_same1 = L"hello";
ASSERT_FALSE(wide_string_c != c_string_same1);
ASSERT_FALSE(c_string_same1 != wide_string_c);
@@ -327,5 +311,4 @@ TEST(fxcrt, WideStringCOperatorNE) {
ASSERT_TRUE(c_string1 != wide_string_c);
ASSERT_TRUE(c_string2 != wide_string_c);
ASSERT_TRUE(c_string3 != wide_string_c);
-#endif
}
« core/src/fxcrt/fx_basic_wstring.cpp ('K') | « core/src/fxcrt/fx_basic_wstring.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698