| 152 | static std::string const stdstr = "abc"; |
| 153 | |
| 154 | static bool testFromStdString(cm::String const& str) |
| 155 | { |
| 156 | #if defined(_GLIBCXX_USE_CXX11_ABI) && _GLIBCXX_USE_CXX11_ABI |
| 157 | // It would be nice to check this everywhere, but several platforms |
| 158 | // still use a CoW implementation even in C++11. |
| 159 | ASSERT_TRUE(str.data() != stdstr.data()); |
| 160 | #endif |
| 161 | ASSERT_TRUE(str.size() == 3); |
| 162 | ASSERT_TRUE(std::strncmp(str.data(), stdstr.data(), 3) == 0); |
| 163 | ASSERT_TRUE(str.is_stable()); |
| 164 | return true; |
| 165 | } |
| 166 | |
| 167 | static bool testConstructFromStdString() |
| 168 | { |
no test coverage detected
searching dependent graphs…