| 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 b75a6fbd39c9f4a870e849aad9e125924dc51681..d49d244a439ba9a812f894b5e790bdb976b3e65d 100644
|
| --- a/core/src/fxcrt/fx_basic_wstring_unittest.cpp
|
| +++ b/core/src/fxcrt/fx_basic_wstring_unittest.cpp
|
| @@ -440,3 +440,31 @@ TEST(fxcrt, WideStringCOperatorNE) {
|
| EXPECT_TRUE(c_string2 != wide_string_c);
|
| EXPECT_TRUE(c_string3 != wide_string_c);
|
| }
|
| +
|
| +TEST(fxcrt, WideStringFormatWidth) {
|
| + {
|
| + CFX_WideString str;
|
| + str.Format(L"%5d", 1);
|
| + EXPECT_EQ(L" 1", str);
|
| + }
|
| +
|
| + {
|
| + CFX_WideString str;
|
| + str.Format(L"%d", 1);
|
| + EXPECT_EQ(L"1", str);
|
| + }
|
| +}
|
| +
|
| +TEST(fxcrt, WideStringFormatPrecision) {
|
| + {
|
| + CFX_WideString str;
|
| + str.Format(L"%.2f", 1.12345);
|
| + EXPECT_EQ(L"1.12", str);
|
| + }
|
| +
|
| + {
|
| + CFX_WideString str;
|
| + str.Format(L"%f", 1.12345);
|
| + EXPECT_EQ(L"1.123450", str);
|
| + }
|
| +}
|
|
|