Public Member Functions | |
| TestScriptApi () | |
| const char * | getName () |
| void | runTests (IGameDef *gamedef) |
| void | testVectorMetatable (MyScriptApi *script) |
| void | testVectorRead (MyScriptApi *script) |
| void | testVectorReadErr (MyScriptApi *script) |
| void | testVectorReadMix (MyScriptApi *script) |
| void | testVectorReadFloat (MyScriptApi *script) |
| void | testReadParamFloat (MyScriptApi *script) |
| Public Member Functions inherited from TestBase | |
| bool | testModule (IGameDef *gamedef) |
| std::string | getTestTempDirectory () |
| std::string | getTestTempFile () |
| void | runTest (const char *name, std::function< void()> &&test) |
Additional Inherited Members | |
| Public Attributes inherited from TestBase | |
| u32 | num_tests_failed |
| u32 | num_tests_run |
| Private Member Functions inherited from LuaHelper | |
| template<> | |
| bool | readParam (lua_State *L, int index) |
| template<> | |
| s16 | readParam (lua_State *L, int index) |
| template<> | |
| int | readParam (lua_State *L, int index) |
| template<> | |
| float | readParam (lua_State *L, int index) |
| template<> | |
| v2s16 | readParam (lua_State *L, int index) |
| template<> | |
| v2f | readParam (lua_State *L, int index) |
| template<> | |
| v3f | readParam (lua_State *L, int index) |
| template<> | |
| std::string_view | readParam (lua_State *L, int index) |
| template<> | |
| std::string | readParam (lua_State *L, int index) |
| template<> | |
| std::string_view | readParam (lua_State *L, int index) |
| Read a string from Lua state L at index without copying it. | |
| Static Private Member Functions inherited from LuaHelper | |
| template<typename T> | |
| static T | readParam (lua_State *L, int index) |
| Read a value using a template type T from Lua state L at index. | |
| template<typename T> | |
| static T | readParam (lua_State *L, int index, const T &default_value) |
| Read a value using a template type T from Lua state L at index. | |
|
inline |
|
inlinevirtual |
Implements TestBase.
|
virtual |
Implements TestBase.
References TestBase::num_tests_failed, rawstream, TEST, testReadParamFloat(), testVectorMetatable(), testVectorRead(), testVectorReadErr(), testVectorReadFloat(), testVectorReadMix(), and BaseException::what().
| void TestScriptApi::testReadParamFloat | ( | MyScriptApi * | script | ) |
References EXCEPTION_CHECK, infostream, LuaHelper::readParam(), run(), UASSERT, and UASSERTEQ.
Referenced by runTests().
| void TestScriptApi::testVectorMetatable | ( | MyScriptApi * | script | ) |
References push_v2f(), push_v2s32(), push_v3f(), push_v3s16(), run(), and UASSERT.
Referenced by runTests().
| void TestScriptApi::testVectorRead | ( | MyScriptApi * | script | ) |
References check_v3s16(), read_v3s16(), run(), S16_MAX, S16_MIN, and UASSERTEQ.
Referenced by runTests().
| void TestScriptApi::testVectorReadErr | ( | MyScriptApi * | script | ) |
References check_v3s16(), EXCEPTION_CHECK, infostream, read_v3s16(), and run().
Referenced by runTests().
| void TestScriptApi::testVectorReadFloat | ( | MyScriptApi * | script | ) |
References check_v3f(), EXCEPTION_CHECK, infostream, read_v3f(), run(), and UASSERT.
Referenced by runTests().
| void TestScriptApi::testVectorReadMix | ( | MyScriptApi * | script | ) |
References check_v3s16(), EXCEPTION_CHECK, infostream, read_v3s16(), run(), and UASSERTEQ.
Referenced by runTests().