◆ TestInventory()
TestInventory::TestInventory |
( |
| ) |
|
|
inline |
◆ getName()
const char * TestInventory::getName |
( |
| ) |
|
|
inlinevirtual |
◆ runTests()
void TestInventory::runTests |
( |
IGameDef * | gamedef | ) |
|
|
virtual |
◆ testSerializeDeserialize()
References ItemStack::count, Inventory::deSerialize(), InventoryList::getItem(), Inventory::getList(), InventoryList::getWidth(), Inventory::serialize(), serialized_inventory_in, serialized_inventory_inc, serialized_inventory_out, Inventory::setModified(), InventoryList::setName(), InventoryList::setWidth(), InventoryList::takeItem(), UASSERT, and UASSERTEQ.
Referenced by runTests().
◆ serialized_inventory_in
const char * TestInventory::serialized_inventory_in |
|
static |
Initial value:=
"List 0 10\n"
"Width 3\n"
"Empty\n"
"Empty\n"
"Item default:cobble 61\n"
"Empty\n"
"Empty\n"
"Item default:dirt 71\n"
"Empty\n"
"Item default:dirt 99\n"
"Item default:cobble 38\n"
"Empty\n"
"EndInventoryList\n"
"List abc 1\n"
"Item default:stick 3\n"
"Width 0\n"
"EndInventoryList\n"
"EndInventory\n"
Referenced by testSerializeDeserialize().
◆ serialized_inventory_inc
const char * TestInventory::serialized_inventory_inc |
|
static |
◆ serialized_inventory_out
const char * TestInventory::serialized_inventory_out |
|
static |
Initial value:=
"List main 10\n"
"Width 5\n"
"Empty\n"
"Empty\n"
"Item default:cobble 61\n"
"Empty\n"
"Empty\n"
"Item default:dirt 71\n"
"Empty\n"
"Item default:dirt 99\n"
"Item default:cobble 38\n"
"Empty\n"
"EndInventoryList\n"
"List abc 1\n"
"Width 0\n"
"Item default:stick 3\n"
"EndInventoryList\n"
"EndInventory\n"
Referenced by testSerializeDeserialize().
The documentation for this class was generated from the following file: