summaryrefslogtreecommitdiff
path: root/core/fxcrt/cfx_widestring_unittest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxcrt/cfx_widestring_unittest.cpp')
-rw-r--r--core/fxcrt/cfx_widestring_unittest.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/core/fxcrt/cfx_widestring_unittest.cpp b/core/fxcrt/cfx_widestring_unittest.cpp
index 4cd71d9997..1d6d110497 100644
--- a/core/fxcrt/cfx_widestring_unittest.cpp
+++ b/core/fxcrt/cfx_widestring_unittest.cpp
@@ -406,10 +406,10 @@ TEST(fxcrt, WideStringMid) {
CFX_WideString fred(L"FRED");
EXPECT_EQ(L"", fred.Mid(0, 0));
EXPECT_EQ(L"", fred.Mid(3, 0));
- EXPECT_EQ(L"FRED", fred.Mid(0));
- EXPECT_EQ(L"RED", fred.Mid(1));
- EXPECT_EQ(L"ED", fred.Mid(2));
- EXPECT_EQ(L"D", fred.Mid(3));
+ EXPECT_EQ(L"FRED", fred.Mid(0, 4));
+ EXPECT_EQ(L"RED", fred.Mid(1, 3));
+ EXPECT_EQ(L"ED", fred.Mid(2, 2));
+ EXPECT_EQ(L"D", fred.Mid(3, 1));
EXPECT_EQ(L"F", fred.Mid(0, 1));
EXPECT_EQ(L"R", fred.Mid(1, 1));
EXPECT_EQ(L"E", fred.Mid(2, 1));
@@ -424,9 +424,6 @@ TEST(fxcrt, WideStringMid) {
CFX_WideString empty;
EXPECT_EQ(L"", empty.Mid(0, 0));
- EXPECT_EQ(L"", empty.Mid(0));
- EXPECT_EQ(L"", empty.Mid(1));
- EXPECT_EQ(L"", empty.Mid(-1));
}
TEST(fxcrt, WideStringLeft) {