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

Function testCreateFromFileSets

Tests/CMakeLib/testDebuggerVariablesHelper.cxx:543–570  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

541}
542
543static bool testCreateFromFileSets()
544{
545 auto variablesManager =
546 std::make_shared<cmDebugger::cmDebuggerVariablesManager>();
547 auto dummies = CreateDummies("Foo");
548
549 cmFileSet fileSet(dummies.Makefile.get(), "Foo", "HEADERS",
550 cmFileSetVisibility::Public);
551 BT<std::string> directory;
552 directory.Value = "c:/";
553 fileSet.AddDirectoryEntry(directory);
554 BT<std::string> file;
555 file.Value = "c:/foo.cxx";
556 fileSet.AddFileEntry(file);
557
558 auto fileSets = std::vector<cmFileSet*>{ &fileSet };
559 auto vars = cmDebugger::cmDebuggerVariablesHelper::CreateIfAny(
560 variablesManager, "Locals", true, fileSets);
561
562 dap::array<dap::Variable> variables =
563 variablesManager->HandleVariablesRequest(
564 CreateVariablesRequest(vars->GetId()));
565
566 ASSERT_TRUE(variables.size() == 1);
567 ASSERT_VARIABLE_REFERENCE_NOT_ZERO(variables[0], "Foo", "", "collection");
568
569 return true;
570}
571
572int testDebuggerVariablesHelper(int, char*[])
573{

Callers

nothing calls this directly

Calls 8

CreateDummiesFunction · 0.85
AddDirectoryEntryMethod · 0.80
AddFileEntryMethod · 0.80
CreateVariablesRequestFunction · 0.70
getMethod · 0.45
GetIdMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…