summaryrefslogtreecommitdiff
path: root/core/fxcrt/cfx_bytestring_unittest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxcrt/cfx_bytestring_unittest.cpp')
-rw-r--r--core/fxcrt/cfx_bytestring_unittest.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/core/fxcrt/cfx_bytestring_unittest.cpp b/core/fxcrt/cfx_bytestring_unittest.cpp
index 42627c2299..14d9393371 100644
--- a/core/fxcrt/cfx_bytestring_unittest.cpp
+++ b/core/fxcrt/cfx_bytestring_unittest.cpp
@@ -1239,3 +1239,16 @@ TEST(fxcrt, ByteStringAnyAllNoneOf) {
EXPECT_TRUE(pdfium::ContainsValue(str, 'b'));
EXPECT_FALSE(pdfium::ContainsValue(str, 'z'));
}
+
+TEST(fxcrt, EqualNoCase) {
+ CFX_ByteString str("aaa");
+ EXPECT_TRUE(str.EqualNoCase("aaa"));
+ EXPECT_TRUE(str.EqualNoCase("AAA"));
+ EXPECT_TRUE(str.EqualNoCase("aaA"));
+ EXPECT_TRUE(str.EqualNoCase("Aaa"));
+ EXPECT_FALSE(str.EqualNoCase("aab"));
+ EXPECT_FALSE(str.EqualNoCase("aaaa"));
+ EXPECT_FALSE(str.EqualNoCase("BBBB"));
+ EXPECT_FALSE(str.EqualNoCase("a"));
+ EXPECT_FALSE(str.EqualNoCase(""));
+}