summaryrefslogtreecommitdiff
path: root/test/testMainWindow.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2024-06-04 18:01:10 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2024-06-04 18:01:10 +0100
commit2c87aa33dfde23920d1dccd04c472c8884118b90 (patch)
treea90075a27f8490d440957526bf05c9dd6121bc0a /test/testMainWindow.cpp
parentAssign an id to the root project (diff)
downloadilt-2c87aa33dfde23920d1dccd04c472c8884118b90.tar.bz2
ilt-2c87aa33dfde23920d1dccd04c472c8884118b90.tar.xz
ilt-2c87aa33dfde23920d1dccd04c472c8884118b90.zip
Replace messy uasprintf with std::format
Diffstat (limited to 'test/testMainWindow.cpp')
-rw-r--r--test/testMainWindow.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/testMainWindow.cpp b/test/testMainWindow.cpp
index 57e3473..d0b674c 100644
--- a/test/testMainWindow.cpp
+++ b/test/testMainWindow.cpp
@@ -1,6 +1,6 @@
#include "testMainWindow.h"
-#include "testHelpers.h"
#include <boost/test/test_tools.hpp>
+#include <format>
TestMainWindow::TestMainWindow() : Window {1, 1, __FILE__, SDL_WINDOW_OPENGL | SDL_WINDOW_HIDDEN}
{
@@ -8,18 +8,18 @@ TestMainWindow::TestMainWindow() : Window {1, 1, __FILE__, SDL_WINDOW_OPENGL | S
glDebugMessageCallback(
[](GLenum /*source*/, GLenum type, GLuint /*id*/, GLenum severity, GLsizei /*length*/,
const GLchar * message, const void *) {
- const auto msg = uasprintf("GL CALLBACK: %s type = 0x%x, severity = 0x%x, message = %s",
+ const auto msg = std::format("GL CALLBACK: {} type = 0x{:x}, severity = 0x{:x}, message = {}",
(type == GL_DEBUG_TYPE_ERROR ? "** GL ERROR **" : ""), type, severity, message);
switch (type) {
case GL_DEBUG_TYPE_ERROR:
case GL_DEBUG_TYPE_PORTABILITY:
case GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR:
case GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR:
- BOOST_TEST_ERROR(msg.get());
+ BOOST_TEST_ERROR(msg);
case GL_DEBUG_TYPE_PERFORMANCE:
- BOOST_TEST_WARN(msg.get());
+ BOOST_TEST_WARN(msg.c_str());
default:
- BOOST_TEST_MESSAGE(msg.get());
+ BOOST_TEST_MESSAGE(msg);
}
},
nullptr);