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

Function testConstructDefault

Tests/CMakeLib/testString.cxx:19–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17#include "testCommon.h"
18
19static bool testConstructDefault()
20{
21 std::cout << "testConstructDefault()\n";
22 cm::String str;
23 cm::String const& str_const = str;
24 ASSERT_TRUE(bool(str_const) == false);
25 ASSERT_TRUE(str_const.data() == nullptr);
26 ASSERT_TRUE(str_const.size() == 0);
27 ASSERT_TRUE(str_const.empty());
28 ASSERT_TRUE(str_const.is_stable());
29 ASSERT_TRUE(str.c_str() == nullptr);
30 ASSERT_TRUE(str.str().empty());
31 ASSERT_TRUE(str.is_stable());
32 return true;
33}
34
35static bool testFromNullPtr(cm::String str)
36{

Callers

nothing calls this directly

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…