diff options
Diffstat (limited to 'core/src/fxcrt/fx_basic_wstring_unittest.cpp')
-rw-r--r-- | core/src/fxcrt/fx_basic_wstring_unittest.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/core/src/fxcrt/fx_basic_wstring_unittest.cpp b/core/src/fxcrt/fx_basic_wstring_unittest.cpp index 8ce778920f..74410ddda3 100644 --- a/core/src/fxcrt/fx_basic_wstring_unittest.cpp +++ b/core/src/fxcrt/fx_basic_wstring_unittest.cpp @@ -516,3 +516,11 @@ TEST(fxcrt, WideStringFormatPrecision) { EXPECT_EQ(L"Bad precision", str); } } + +TEST(fxcrt, EmptyWideString) { + CFX_WideString empty_str; + EXPECT_TRUE(empty_str.IsEmpty()); + EXPECT_EQ(0, empty_str.GetLength()); + const FX_WCHAR* cstr = empty_str.c_str(); + EXPECT_EQ(0, FXSYS_wcslen(cstr)); +} |