| 541 | } |
| 542 | |
| 543 | static 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 | |
| 572 | int testDebuggerVariablesHelper(int, char*[]) |
| 573 | { |
nothing calls this directly
no test coverage detected
searching dependent graphs…