aboutsummaryrefslogtreecommitdiff
path: root/unit_tests/misc_tests.cpp
diff options
context:
space:
mode:
authorBenoit Germain <benoit.germain@ubisoft.com>2025-10-27 08:43:22 +0100
committerBenoit Germain <benoit.germain@ubisoft.com>2025-10-27 08:43:22 +0100
commit5e5bcf37450d07f7f2812255bbd1df35d8e6ce75 (patch)
tree14cac4a19d4e35b60f0a56c948f45b158881daa5 /unit_tests/misc_tests.cpp
parent3b4848ca1c4ea40d0e052cdc81bb9f66ce882a8a (diff)
downloadlanes-5e5bcf37450d07f7f2812255bbd1df35d8e6ce75.tar.gz
lanes-5e5bcf37450d07f7f2812255bbd1df35d8e6ce75.tar.bz2
lanes-5e5bcf37450d07f7f2812255bbd1df35d8e6ce75.zip
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
Diffstat (limited to 'unit_tests/misc_tests.cpp')
-rw-r--r--unit_tests/misc_tests.cpp9
1 files changed, 9 insertions, 0 deletions
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")
191 " l:send('k', t)" // send the table, it should raise an error because the converter retries too many times 191 " l:send('k', t)" // send the table, it should raise an error because the converter retries too many times
192 ); 192 );
193} 193}
194
195#define MAKE_TEST_CASE(DIR, FILE, CONDITION) \
196 TEST_CASE("scripted_tests." #DIR "." #FILE) \
197 { \
198 FileRunner _runner(R"(.\unit_tests\scripts)"); \
199 _runner.performTest(FileRunnerParam{ #DIR "/" #FILE, TestType::CONDITION }); \
200 }
201
202MAKE_TEST_CASE(misc, verbose_errors, AssertNoLuaError)