Luanti 5.16.0-dev
Loading...
Searching...
No Matches
TestMoveAction Class Reference
Inheritance diagram for TestMoveAction:
Collaboration diagram for TestMoveAction:

Public Member Functions

 TestMoveAction ()
const char * getName ()
void runTests (IGameDef *gamedef)
void testMove (ServerActiveObject *obj, IGameDef *gamedef)
void testMoveFillStack (ServerActiveObject *obj, IGameDef *gamedef)
void testMoveSomewhere (ServerActiveObject *obj, IGameDef *gamedef)
void testMoveSomewherePartial (ServerActiveObject *obj, IGameDef *gamedef)
void testMoveUnallowed (ServerActiveObject *obj, IGameDef *gamedef)
void testMovePartial (ServerActiveObject *obj, IGameDef *gamedef)
void testSwap (ServerActiveObject *obj, IGameDef *gamedef)
void testSwapFromUnallowed (ServerActiveObject *obj, IGameDef *gamedef)
void testSwapToUnallowed (ServerActiveObject *obj, IGameDef *gamedef)
void testCallbacks (ServerActiveObject *obj, Server *server)
void testCallbacksSwap (ServerActiveObject *obj, Server *server)
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

Constructor & Destructor Documentation

◆ TestMoveAction()

TestMoveAction::TestMoveAction ( )
inline

References TestManager::registerTestModule().

Here is the call graph for this function:

Member Function Documentation

◆ getName()

const char * TestMoveAction::getName ( )
inlinevirtual

Implements TestBase.

◆ runTests()

void TestMoveAction::runTests ( IGameDef * gamedef)
virtual

◆ testCallbacks()

void TestMoveAction::testCallbacks ( ServerActiveObject * obj,
Server * server )

References InventoryList::addItem(), Inventory::addList(), apply_action(), check_function(), MockInventoryManager::p1, MockInventoryManager::p2, parse_itemstack(), and UASSERT.

Referenced by runTests().

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

◆ testCallbacksSwap()

void TestMoveAction::testCallbacksSwap ( ServerActiveObject * obj,
Server * server )

References InventoryList::addItem(), Inventory::addList(), apply_action(), check_function(), MockInventoryManager::p1, MockInventoryManager::p2, parse_itemstack(), and UASSERT.

Referenced by runTests().

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

◆ testMove()

void TestMoveAction::testMove ( ServerActiveObject * obj,
IGameDef * gamedef )

References InventoryList::addItem(), Inventory::addList(), apply_action(), InventoryList::getItem(), ItemStack::getItemString(), Inventory::getList(), MockInventoryManager::p1, MockInventoryManager::p2, parse_itemstack(), and UASSERT.

Referenced by runTests().

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

◆ testMoveFillStack()

void TestMoveAction::testMoveFillStack ( ServerActiveObject * obj,
IGameDef * gamedef )

References Inventory::addList(), apply_action(), InventoryList::changeItem(), MockInventoryManager::p1, parse_itemstack(), and UASSERT.

Referenced by runTests().

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

◆ testMovePartial()

void TestMoveAction::testMovePartial ( ServerActiveObject * obj,
IGameDef * gamedef )

References InventoryList::addItem(), Inventory::addList(), apply_action(), InventoryList::getItem(), ItemStack::getItemString(), Inventory::getList(), MockInventoryManager::p1, MockInventoryManager::p2, parse_itemstack(), and UASSERT.

Referenced by runTests().

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

◆ testMoveSomewhere()

void TestMoveAction::testMoveSomewhere ( ServerActiveObject * obj,
IGameDef * gamedef )

References InventoryList::addItem(), Inventory::addList(), apply_action(), InventoryList::getItem(), ItemStack::getItemString(), Inventory::getList(), MockInventoryManager::p1, MockInventoryManager::p2, parse_itemstack(), and UASSERT.

Referenced by runTests().

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

◆ testMoveSomewherePartial()

void TestMoveAction::testMoveSomewherePartial ( ServerActiveObject * obj,
IGameDef * gamedef )

References InventoryList::addItem(), Inventory::addList(), apply_action(), InventoryList::changeItem(), InventoryList::getItem(), ItemStack::getItemString(), Inventory::getList(), MockInventoryManager::p1, MockInventoryManager::p2, parse_itemstack(), and UASSERT.

Referenced by runTests().

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

◆ testMoveUnallowed()

void TestMoveAction::testMoveUnallowed ( ServerActiveObject * obj,
IGameDef * gamedef )

References InventoryList::addItem(), Inventory::addList(), apply_action(), ItemStack::empty(), InventoryList::getItem(), ItemStack::getItemString(), Inventory::getList(), MockInventoryManager::p1, MockInventoryManager::p2, parse_itemstack(), and UASSERT.

Referenced by runTests().

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

◆ testSwap()

void TestMoveAction::testSwap ( ServerActiveObject * obj,
IGameDef * gamedef )

References InventoryList::addItem(), Inventory::addList(), apply_action(), InventoryList::getItem(), ItemStack::getItemString(), Inventory::getList(), MockInventoryManager::p1, MockInventoryManager::p2, parse_itemstack(), and UASSERT.

Referenced by runTests().

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

◆ testSwapFromUnallowed()

void TestMoveAction::testSwapFromUnallowed ( ServerActiveObject * obj,
IGameDef * gamedef )

References InventoryList::addItem(), Inventory::addList(), apply_action(), InventoryList::getItem(), ItemStack::getItemString(), Inventory::getList(), MockInventoryManager::p1, MockInventoryManager::p2, parse_itemstack(), and UASSERT.

Referenced by runTests().

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

◆ testSwapToUnallowed()

void TestMoveAction::testSwapToUnallowed ( ServerActiveObject * obj,
IGameDef * gamedef )

References InventoryList::addItem(), Inventory::addList(), apply_action(), InventoryList::getItem(), ItemStack::getItemString(), Inventory::getList(), MockInventoryManager::p1, MockInventoryManager::p2, parse_itemstack(), and UASSERT.

Referenced by runTests().

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

The documentation for this class was generated from the following file: