| 148 | } |
| 149 | |
| 150 | static bool testCreateFromStringVector() |
| 151 | { |
| 152 | auto variablesManager = |
| 153 | std::make_shared<cmDebugger::cmDebuggerVariablesManager>(); |
| 154 | |
| 155 | std::vector<std::string> list = { "Foo", "Bar" }; |
| 156 | |
| 157 | auto vars = cmDebugger::cmDebuggerVariablesHelper::CreateIfAny( |
| 158 | variablesManager, "Locals", true, list); |
| 159 | |
| 160 | dap::array<dap::Variable> variables = |
| 161 | variablesManager->HandleVariablesRequest( |
| 162 | CreateVariablesRequest(vars->GetId())); |
| 163 | |
| 164 | ASSERT_TRUE(vars->GetValue() == std::to_string(list.size())); |
| 165 | ASSERT_TRUE(variables.size() == 2); |
| 166 | ASSERT_VARIABLE(variables[0], "[0]", "Foo", "string"); |
| 167 | ASSERT_VARIABLE(variables[1], "[1]", "Bar", "string"); |
| 168 | |
| 169 | auto none = cmDebugger::cmDebuggerVariablesHelper::CreateIfAny( |
| 170 | variablesManager, "Locals", true, std::vector<std::string>()); |
| 171 | |
| 172 | ASSERT_TRUE(none == nullptr); |
| 173 | |
| 174 | return true; |
| 175 | } |
| 176 | |
| 177 | static bool testCreateFromTarget() |
| 178 | { |
nothing calls this directly
no test coverage detected
searching dependent graphs…