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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user