| 14 | #include "testCommon.h" |
| 15 | |
| 16 | static bool testStackFrameFunctionName( |
| 17 | dap::optional<dap::StackFrameFormat> format, char const* expectedName) |
| 18 | { |
| 19 | auto thread = std::make_shared<cmDebugger::cmDebuggerThread>(0, "name"); |
| 20 | auto const* functionName = "function_name"; |
| 21 | auto arguments = std::vector<cmListFileArgument>{ cmListFileArgument( |
| 22 | "arg"_s, cmListFileArgument::Delimiter::Unquoted, 0) }; |
| 23 | cmListFileFunction func(functionName, 10, 20, arguments); |
| 24 | thread->PushStackFrame(nullptr, "CMakeLists.txt", func); |
| 25 | |
| 26 | auto stackTrace = GetStackTraceResponse(thread, format); |
| 27 | |
| 28 | ASSERT_TRUE(stackTrace.stackFrames[0].name == expectedName); |
| 29 | return true; |
| 30 | } |
| 31 | |
| 32 | bool testStackFrameNoFormatting() |
| 33 | { |
no test coverage detected
searching dependent graphs…