Luanti 5.11.0-dev
 
Loading...
Searching...
No Matches
test_sao.cpp File Reference
#include "test.h"
#include "mock_server.h"
#include "server/luaentity_sao.h"
#include "emerge.h"
+ Include dependency graph for test_sao.cpp:

Classes

class  TestSAO
 

Functions

static LuaEntitySAOadd_entity (ServerEnvironment *env, v3f pos, const char *name)
 
static u16 assert_active_in_block (MapBlock *block, u16 obj_id=0)
 

Variables

static TestSAO g_test_instance
 
static const char * helper_lua_src
 

Function Documentation

◆ add_entity()

static LuaEntitySAO * add_entity ( ServerEnvironment * env,
v3f pos,
const char * name )
static

References ServerEnvironment::addActiveObject().

Referenced by ModApiEnv::Initialize(), TestSAO::testNotSaved(), TestSAO::testStaticSave(), and TestSAO::testStaticToTrue().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ assert_active_in_block()

static u16 assert_active_in_block ( MapBlock * block,
u16 obj_id = 0 )
static

References MapBlock::m_static_objects, UASSERT, and UASSERTEQ.

Referenced by TestSAO::testActivate(), TestSAO::testStaticSave(), and TestSAO::testStaticToFalse().

+ Here is the caller graph for this function:

Variable Documentation

◆ g_test_instance

TestSAO g_test_instance
static

◆ helper_lua_src

const char* helper_lua_src
static
Initial value:
= R"(
core.register_entity(":test:static", {})
core.register_entity(":test:non_static", {
initial_properties = {
static_save = false,
}
})
)"

Referenced by TestSAO::runTests().