chore(build): containers, toolchains and portability fixes

This commit is contained in:
faumaray committed 2026-12-03 08:10:07 +00:00
1 parent 5a74233a4d
commit 496d9fc582
1 file changed
+17 -5
+17 -5
View File
@@ -1,7 +1,6 @@
#pragma once #pragma once
#include <Void/Core/Meta.hpp> #include <Void/Core/Meta.hpp>
#include <Void/Testing/Annotations.hpp>
#include <Void/Testing/Config.hpp> #include <Void/Testing/Config.hpp>
#include <Void/Testing/Detail/Registry.hpp> #include <Void/Testing/Detail/Registry.hpp>
#include <Void/Testing/Test.hpp> #include <Void/Testing/Test.hpp>
@@ -11,6 +10,7 @@
#if __has_include(<meta>) #if __has_include(<meta>)
#include <meta> #include <meta>
#include <Void/Testing/Annotations.hpp>
#define VOID_TESTING_HAS_REFLECTION 1 #define VOID_TESTING_HAS_REFLECTION 1
#endif #endif
@@ -95,6 +95,13 @@ namespace Void::Testing
} }
} }
/// Non-capturing thunk: a template argument is a constant
/// expression, unlike a reflected member captured by a lambda.
template <meta::info M> static void run_method_thunk()
{
run_method<M>();
}
static std::string suite_label() static std::string suite_label()
{ {
if constexpr (constexpr auto n = if constexpr (constexpr auto n =
@@ -138,12 +145,17 @@ namespace Void::Testing
skip_reason = std::string{s->reason.view()}; skip_reason = std::string{s->reason.view()};
} }
constexpr auto name = meta::identifier_of(m);
constexpr const char* file = loc.file_name();
constexpr int line =
static_cast<int>(loc.line());
constexpr auto run = &run_method_thunk<m>;
reg.add(TestCase{ reg.add(TestCase{
.run = [] { run_method<m>(); }, .run = run,
.name = std::string{meta::identifier_of(m)}, .name = std::string{name},
.suite = suite, .suite = suite,
.file = loc.file_name(), .file = file,
.line = static_cast<int>(loc.line()), .line = line,
.disabled = disabled, .disabled = disabled,
.skip_reason = std::move(skip_reason), .skip_reason = std::move(skip_reason),
.tags = std::move(tags), .tags = std::move(tags),