summaryrefslogtreecommitdiff
path: root/core/src/fxcrt/fx_basic_bstring_unittest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/fxcrt/fx_basic_bstring_unittest.cpp')
-rw-r--r--core/src/fxcrt/fx_basic_bstring_unittest.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/core/src/fxcrt/fx_basic_bstring_unittest.cpp b/core/src/fxcrt/fx_basic_bstring_unittest.cpp
index 614206bb60..337775d9af 100644
--- a/core/src/fxcrt/fx_basic_bstring_unittest.cpp
+++ b/core/src/fxcrt/fx_basic_bstring_unittest.cpp
@@ -679,3 +679,11 @@ TEST(fxcrt, ByteStringFormatPrecision) {
EXPECT_EQ("Bad precision", str);
}
}
+
+TEST(fxcrt, EmptyByteString) {
+ CFX_ByteString empty_str;
+ EXPECT_TRUE(empty_str.IsEmpty());
+ EXPECT_EQ(0, empty_str.GetLength());
+ const FX_CHAR* cstr = empty_str.c_str();
+ EXPECT_EQ(0, FXSYS_strlen(cstr));
+}