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

Function testStability

Tests/CMakeLib/testString.cxx:1141–1156  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1139}
1140
1141static 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
1158int testString(int /*unused*/, char* /*unused*/[])
1159{

Callers

nothing calls this directly

Calls 3

is_stableMethod · 0.80
str_if_stableMethod · 0.80
stabilizeMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…