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

Function testMethod_view

Tests/CMakeLib/testString.cxx:541–554  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

539}
540
541static bool testMethod_view()
542{
543 std::cout << "testMethod_view()\n";
544 cm::String str;
545 ASSERT_TRUE(str.view().data() == nullptr);
546 ASSERT_TRUE(str.view().size() == 0);
547 str = charArray;
548 ASSERT_TRUE(str.view().data() != charArray);
549 ASSERT_TRUE(str.view().size() == sizeof(charArray) - 1);
550 str = std::string("abc");
551 ASSERT_TRUE(str.view().size() == 3);
552 ASSERT_TRUE(strncmp(str.view().data(), "abc", 3) == 0);
553 return true;
554}
555
556static bool testMethod_empty()
557{

Callers

nothing calls this directly

Calls 3

viewMethod · 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…