Luanti 5.11.0-dev
 
Loading...
Searching...
No Matches
test_moveaction.cpp File Reference
#include "test.h"
#include "mock_inventorymanager.h"
#include "mock_server.h"
#include "mock_serveractiveobject.h"
+ Include dependency graph for test_moveaction.cpp:

Classes

class  TestMoveAction
 

Functions

static ItemStack parse_itemstack (const char *s)
 
static void apply_action (const char *s, InventoryManager *inv, ServerActiveObject *obj, IGameDef *gamedef)
 
static bool check_function (lua_State *L, bool expect_swap)
 

Variables

static TestMoveAction g_test_instance
 

Function Documentation

◆ apply_action()

static void apply_action ( const char * s,
InventoryManager * inv,
ServerActiveObject * obj,
IGameDef * gamedef )
static

References InventoryAction::apply(), and InventoryAction::deSerialize().

Referenced by TestMoveAction::testCallbacks(), TestMoveAction::testCallbacksSwap(), TestMoveAction::testMove(), TestMoveAction::testMoveFillStack(), TestMoveAction::testMovePartial(), TestMoveAction::testMoveSomewhere(), TestMoveAction::testMoveSomewherePartial(), TestMoveAction::testMoveUnallowed(), TestMoveAction::testSwap(), TestMoveAction::testSwapFromUnallowed(), and TestMoveAction::testSwapToUnallowed().

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

◆ check_function()

static bool check_function ( lua_State * L,
bool expect_swap )
static

References errorstream, and PUSH_ERROR_HANDLER.

Referenced by TestMoveAction::testCallbacks(), and TestMoveAction::testCallbacksSwap().

+ Here is the caller graph for this function:

◆ parse_itemstack()

static ItemStack parse_itemstack ( const char * s)
static

References ItemStack::deSerialize().

Referenced by TestMoveAction::testCallbacks(), TestMoveAction::testCallbacksSwap(), TestMoveAction::testMove(), TestMoveAction::testMoveFillStack(), TestMoveAction::testMovePartial(), TestMoveAction::testMoveSomewhere(), TestMoveAction::testMoveSomewherePartial(), TestMoveAction::testMoveUnallowed(), TestMoveAction::testSwap(), TestMoveAction::testSwapFromUnallowed(), and TestMoveAction::testSwapToUnallowed().

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

Variable Documentation

◆ g_test_instance

TestMoveAction g_test_instance
static