1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-15 09:25:37 +02:00

Add unit tests for Lua vector reading

This commit is contained in:
sfan5
2025-05-19 17:41:13 +02:00
parent a5263dc7ed
commit ec16fb33d0
5 changed files with 197 additions and 20 deletions

View File

@@ -41,7 +41,7 @@ public:
#define UTEST(x, fmt, ...) \
if (!(x)) { \
char utest_buf[1024]; \
snprintf(utest_buf, sizeof(utest_buf), fmt, __VA_ARGS__); \
porting::mt_snprintf(utest_buf, sizeof(utest_buf), fmt, __VA_ARGS__); \
throw TestFailedException(utest_buf, __FILE__, __LINE__); \
}
@@ -68,7 +68,7 @@ public:
} catch (EType &e) { \
exception_thrown = true; \
} \
UASSERT(exception_thrown); \
UTEST(exception_thrown, "Exception %s not thrown", #EType); \
}
class IGameDef;