| 388 | } |
| 389 | |
| 390 | static bool testOperatorPlusEqual() |
| 391 | { |
| 392 | std::cout << "testOperatorPlusEqual()\n"; |
| 393 | cm::String str = "a"; |
| 394 | str += "b"; |
| 395 | { |
| 396 | char const* c = "c"; |
| 397 | str += c; |
| 398 | } |
| 399 | str += 'd'; |
| 400 | str += std::string("e"); |
| 401 | str += cm::string_view("f", 1); |
| 402 | str += cm::String("g"); |
| 403 | ASSERT_TRUE(str.size() == 7); |
| 404 | ASSERT_TRUE(std::strncmp(str.data(), "abcdefg", 7) == 0); |
| 405 | ASSERT_TRUE(str.is_stable()); |
| 406 | return true; |
| 407 | } |
| 408 | |
| 409 | static bool testOperatorCompare() |
| 410 | { |