From b05c80e7cba551b763fd4fdd224bb444102c5c8e Mon Sep 17 00:00:00 2001 From: Arjen Baart Date: Sun, 12 May 2019 18:37:53 +0200 Subject: [PATCH] Added a test for += String operator --- test/string_cat.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/string_cat.cpp b/test/string_cat.cpp index 6dffb01..56c1da8 100644 --- a/test/string_cat.cpp +++ b/test/string_cat.cpp @@ -25,6 +25,11 @@ int main() std::cout << s2 << " + " << s1 << " = " << s4 << "\n"; assert(s4 == "defabc"); + s3 = s1; + s3 += s2; + std::cout << s1 << " += " << s2 << " = " << s3 << "\n"; + assert(s3 == "abcdef"); + return 0; } -- 2.20.1