From de67d5942b065bb5bec7ab172e1ebfeb79bb83b2 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Thu, 7 Aug 2025 08:26:35 +0200 Subject: [PATCH] fix: Broken formatting in unit tests --- lib/libimhex/include/hex/test/tests.hpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/libimhex/include/hex/test/tests.hpp b/lib/libimhex/include/hex/test/tests.hpp index c8f6cea13..b0cfa438a 100644 --- a/lib/libimhex/include/hex/test/tests.hpp +++ b/lib/libimhex/include/hex/test/tests.hpp @@ -29,7 +29,8 @@ do { \ auto ret = (x); \ if (!ret) { \ - hex::log::error("Test assert '" #x "' failed {} at {}:{}", \ + hex::log::error("Test assert '{}' failed {} at {}:{}", \ + #x, \ fmt::format("" __VA_ARGS__), \ __FILE__, \ __LINE__); \ @@ -93,8 +94,8 @@ namespace hex::test { template - TestSequence operator+(const TestSequenceExecutor &executor, F f) noexcept { - return TestSequence(executor.getName(), std::move(f), executor.shouldFail()); + TestSequence operator+(const TestSequenceExecutor &executor, F &&f) noexcept { + return TestSequence(executor.getName(), std::forward(f), executor.shouldFail()); }