| 106 | } |
| 107 | |
| 108 | static bool testIgnoreEmptyStringEntries() |
| 109 | { |
| 110 | auto variablesManager = |
| 111 | std::make_shared<cmDebugger::cmDebuggerVariablesManager>(); |
| 112 | |
| 113 | auto vars = std::make_shared<cmDebugger::cmDebuggerVariables>( |
| 114 | variablesManager, "Variables", true, []() { |
| 115 | return std::vector<cmDebugger::cmDebuggerVariableEntry>{ |
| 116 | { "IntValue1", 5 }, { "StringValue1", "" }, |
| 117 | { "StringValue2", "foo" }, { "StringValue3", "" }, |
| 118 | { "StringValue4", "bar" }, { "StringValue5", "" }, |
| 119 | { "IntValue2", int64_t(99) }, { "BooleanTrue", true }, |
| 120 | { "BooleanFalse", false }, |
| 121 | }; |
| 122 | }); |
| 123 | |
| 124 | vars->SetIgnoreEmptyStringEntries(true); |
| 125 | vars->SetEnableSorting(false); |
| 126 | |
| 127 | dap::array<dap::Variable> variables = |
| 128 | variablesManager->HandleVariablesRequest( |
| 129 | CreateVariablesRequest(vars->GetId())); |
| 130 | ASSERT_TRUE(variables.size() == 6); |
| 131 | ASSERT_VARIABLE(variables[0], "IntValue1", "5", "int"); |
| 132 | ASSERT_VARIABLE(variables[1], "StringValue2", "foo", "string"); |
| 133 | ASSERT_VARIABLE(variables[2], "StringValue4", "bar", "string"); |
| 134 | ASSERT_VARIABLE(variables[3], "IntValue2", "99", "int"); |
| 135 | ASSERT_VARIABLE(variables[4], "BooleanTrue", "TRUE", "bool"); |
| 136 | ASSERT_VARIABLE(variables[5], "BooleanFalse", "FALSE", "bool"); |
| 137 | |
| 138 | return true; |
| 139 | } |
| 140 | |
| 141 | static bool testSortTheResult() |
| 142 | { |
nothing calls this directly
no test coverage detected
searching dependent graphs…