MCPcopy Create free account
hub / github.com/Kitware/CMake / testFromStdString

Function testFromStdString

Tests/CMakeLib/testString.cxx:154–165  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

152static std::string const stdstr = "abc";
153
154static 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
167static bool testConstructFromStdString()
168{

Callers 2

testAssignFromStdStringFunction · 0.85

Calls 3

is_stableMethod · 0.80
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…