From 5e5bcf37450d07f7f2812255bbd1df35d8e6ce75 Mon Sep 17 00:00:00 2001 From: Benoit Germain Date: Mon, 27 Oct 2025 08:43:22 +0100 Subject: verbose_errors improvement * Use std::format instead of sprintf for verbose errors when decoding table keys * Add a unit test for the different table key types --- unit_tests/misc_tests.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'unit_tests/misc_tests.cpp') diff --git a/unit_tests/misc_tests.cpp b/unit_tests/misc_tests.cpp index a2199aa..3848a75 100644 --- a/unit_tests/misc_tests.cpp +++ b/unit_tests/misc_tests.cpp @@ -191,3 +191,12 @@ TEST_CASE("misc.convert_max_attempts.is_respected") " l:send('k', t)" // send the table, it should raise an error because the converter retries too many times ); } + +#define MAKE_TEST_CASE(DIR, FILE, CONDITION) \ + TEST_CASE("scripted_tests." #DIR "." #FILE) \ + { \ + FileRunner _runner(R"(.\unit_tests\scripts)"); \ + _runner.performTest(FileRunnerParam{ #DIR "/" #FILE, TestType::CONDITION }); \ + } + +MAKE_TEST_CASE(misc, verbose_errors, AssertNoLuaError) -- cgit v1.2.3-55-g6feb