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

Function testStackFrameFunctionName

Tests/CMakeLib/testDebuggerThread.cxx:16–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14#include "testCommon.h"
15
16static 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
32bool testStackFrameNoFormatting()
33{

Calls 3

GetStackTraceResponseFunction · 0.85
PushStackFrameMethod · 0.80
cmListFileArgumentClass · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…