Add test for {Byte,Wide}String Operator+().

Precursor to converting some Format() operations to simple string
addition.

Change-Id: I3a159f5ac548ea14586d87e7d56d1ec288898b0d
Reviewed-on: https://pdfium-review.googlesource.com/39590
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
diff --git a/core/fxcrt/bytestring_unittest.cpp b/core/fxcrt/bytestring_unittest.cpp
index 7095a1b..abc3648 100644
--- a/core/fxcrt/bytestring_unittest.cpp
+++ b/core/fxcrt/bytestring_unittest.cpp
@@ -390,6 +390,13 @@
   EXPECT_TRUE(c_string3 != byte_string);
 }
 
+TEST(ByteString, OperatorPlus) {
+  EXPECT_EQ("I like dogs", "I like " + ByteString("dogs"));
+  EXPECT_EQ("Dogs like me", ByteString("Dogs") + " like me");
+  EXPECT_EQ("Oh no, error number 42",
+            "Oh no, error number " + ByteString::Format("%d", 42));
+}
+
 TEST(ByteString, Concat) {
   ByteString fred;
   fred.Concat("FRED", 4);
diff --git a/core/fxcrt/widestring_unittest.cpp b/core/fxcrt/widestring_unittest.cpp
index 37d4ecd..9017fe0 100644
--- a/core/fxcrt/widestring_unittest.cpp
+++ b/core/fxcrt/widestring_unittest.cpp
@@ -395,6 +395,13 @@
   EXPECT_TRUE(c_string3 != wide_string);
 }
 
+TEST(WideString, OperatorPlus) {
+  EXPECT_EQ(L"I like dogs", L"I like " + WideString(L"dogs"));
+  EXPECT_EQ(L"Dogs like me", WideString(L"Dogs") + L" like me");
+  EXPECT_EQ(L"Oh no, error number 42",
+            L"Oh no, error number " + WideString::Format(L"%d", 42));
+}
+
 TEST(WideString, ConcatInPlace) {
   WideString fred;
   fred.Concat(L"FRED", 4);