aboutsummaryrefslogtreecommitdiff
path: root/src/tooldef.cpp
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2011-12-03 12:02:45 +0200
committerPerttu Ahola <celeron55@gmail.com>2011-12-03 12:02:45 +0200
commitfdf7b3bcdfd62aab2563d92b728e98b3518bbc52 (patch)
tree34f568c5c7f80fbf648413855201b0c83d64f334 /src/tooldef.cpp
parent871e6c0c73d31420a7a3521ddef517198b97f1f8 (diff)
downloadminetest-fdf7b3bcdfd62aab2563d92b728e98b3518bbc52.tar.gz
minetest-fdf7b3bcdfd62aab2563d92b728e98b3518bbc52.tar.bz2
minetest-fdf7b3bcdfd62aab2563d92b728e98b3518bbc52.zip
Call this 0.4.dev-20111203-3
Diffstat (limited to 'src/tooldef.cpp')
0 files changed, 0 insertions, 0 deletions
/a> 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126
/*
Minetest
Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com>

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

#include "test.h"

#include <sstream>

#include "gamedef.h"
#include "inventory.h"

class TestInventory : public TestBase {
public:
	TestInventory() { TestManager::registerTestModule(this); }
	const char *getName() { return "TestInventory"; }

	void runTests(IGameDef *gamedef);

	void testSerializeDeserialize(IItemDefManager *idef);

	static const char *serialized_inventory_in;
	static const char *serialized_inventory_out;
	static const char *serialized_inventory_inc;
};

static TestInventory g_test_instance;

void TestInventory::runTests(IGameDef *gamedef)
{
	TEST(testSerializeDeserialize, gamedef->getItemDefManager());
}

////////////////////////////////////////////////////////////////////////////////

void TestInventory::testSerializeDeserialize(IItemDefManager *idef)
{