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

Function testFromNullPtr

Tests/CMakeLib/testString.cxx:35–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33}
34
35static bool testFromNullPtr(cm::String str)
36{
37 cm::String const& str_const = str;
38 ASSERT_TRUE(bool(str_const) == false);
39 ASSERT_TRUE(str_const.data() == nullptr);
40 ASSERT_TRUE(str_const.size() == 0);
41 ASSERT_TRUE(str_const.empty());
42 ASSERT_TRUE(str_const.is_stable());
43 ASSERT_TRUE(str.c_str() == nullptr);
44 ASSERT_TRUE(str.str().empty());
45 ASSERT_TRUE(str.is_stable());
46 return true;
47}
48
49static bool testConstructFromNullPtr()
50{

Callers 2

testConstructFromNullPtrFunction · 0.85
testAssignFromNullPtrFunction · 0.85

Calls 6

is_stableMethod · 0.80
c_strMethod · 0.80
strMethod · 0.80
dataMethod · 0.45
sizeMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…