From e4483b887147a8698a48babe6653ea9b9387d6e2 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 6 Nov 2023 18:31:15 -0500 Subject: Tests: Avoid compiling call to dap::optional(nullptr) --- Tests/CMakeLib/testDebugger.h | 2 +- Tests/CMakeLib/testDebuggerVariables.cxx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Tests/CMakeLib/testDebugger.h b/Tests/CMakeLib/testDebugger.h index d8d2caa..df67278 100644 --- a/Tests/CMakeLib/testDebugger.h +++ b/Tests/CMakeLib/testDebugger.h @@ -19,7 +19,7 @@ do { \ ASSERT_TRUE(x.name == expectedName); \ ASSERT_TRUE(x.value == expectedValue); \ - if (expectedType == nullptr) { \ + if (expectedType == std::string()) { \ ASSERT_TRUE(x.type == dap::optional()); \ } else { \ ASSERT_TRUE(x.type == dap::optional(expectedType)); \ diff --git a/Tests/CMakeLib/testDebuggerVariables.cxx b/Tests/CMakeLib/testDebuggerVariables.cxx index 0d8d18d..bb3f14d 100644 --- a/Tests/CMakeLib/testDebuggerVariables.cxx +++ b/Tests/CMakeLib/testDebuggerVariables.cxx @@ -196,8 +196,8 @@ static bool testNoSupportsVariableType() CreateVariablesRequest(vars->GetId())); ASSERT_TRUE(variables.size() == 2); - ASSERT_VARIABLE(variables[0], "Children", "", nullptr); - ASSERT_VARIABLE(variables[1], "test", "value", nullptr); + ASSERT_VARIABLE(variables[0], "Children", "", ""); + ASSERT_VARIABLE(variables[1], "test", "value", ""); return true; } -- cgit v0.12