| 1139 | } |
| 1140 | |
| 1141 | static bool testStability() |
| 1142 | { |
| 1143 | std::cout << "testStability()\n"; |
| 1144 | cm::String str("abc"_s); |
| 1145 | ASSERT_TRUE(!str.is_stable()); |
| 1146 | ASSERT_TRUE(str.str_if_stable() == nullptr); |
| 1147 | str.stabilize(); |
| 1148 | ASSERT_TRUE(str.is_stable()); |
| 1149 | std::string const* str_if_stable = str.str_if_stable(); |
| 1150 | ASSERT_TRUE(str_if_stable != nullptr); |
| 1151 | ASSERT_TRUE(*str_if_stable == "abc"); |
| 1152 | str.stabilize(); |
| 1153 | ASSERT_TRUE(str.is_stable()); |
| 1154 | ASSERT_TRUE(str.str_if_stable() == str_if_stable); |
| 1155 | return true; |
| 1156 | } |
| 1157 | |
| 1158 | int testString(int /*unused*/, char* /*unused*/[]) |
| 1159 | { |
nothing calls this directly
no test coverage detected
searching dependent graphs…