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

Function testCreateFromPolicyMap

Tests/CMakeLib/testDebuggerVariablesHelper.cxx:70–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

68}
69
70static bool testCreateFromPolicyMap()
71{
72 auto variablesManager =
73 std::make_shared<cmDebugger::cmDebuggerVariablesManager>();
74
75 cmPolicies::PolicyMap policyMap;
76 policyMap.Set(cmPolicies::CMP0178, cmPolicies::NEW);
77 policyMap.Set(cmPolicies::CMP0179, cmPolicies::WARN);
78 policyMap.Set(cmPolicies::CMP0180, cmPolicies::OLD);
79 auto vars = cmDebugger::cmDebuggerVariablesHelper::Create(
80 variablesManager, "Locals", true, policyMap);
81
82 dap::array<dap::Variable> variables =
83 variablesManager->HandleVariablesRequest(
84 CreateVariablesRequest(vars->GetId()));
85 ASSERT_TRUE(variables.size() == 3);
86 ASSERT_VARIABLE(variables[0], "CMP0178", "NEW", "string");
87 ASSERT_VARIABLE(variables[1], "CMP0179", "WARN", "string");
88 ASSERT_VARIABLE(variables[2], "CMP0180", "OLD", "string");
89
90 return true;
91}
92
93static bool testCreateFromPairVector()
94{

Callers

nothing calls this directly

Calls 5

CreateVariablesRequestFunction · 0.70
SetMethod · 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…