aboutsummaryrefslogtreecommitdiff
path: root/src/porting.h
diff options
context:
space:
mode:
authorparamat <mat.gregory@virginmedia.com>2016-12-01 04:49:17 +0000
committerparamat <mat.gregory@virginmedia.com>2016-12-01 05:09:01 +0000
commit105676b952484affdb97164eceaf4cb903955373 (patch)
treeec55e9bf7450d6dd69bf17e61d8c6163e2ccb09e /src/porting.h
parent6c9f10e132ac80a0caffef12d61de84a0a6b02b3 (diff)
downloadminetest-105676b952484affdb97164eceaf4cb903955373.tar.gz
minetest-105676b952484affdb97164eceaf4cb903955373.tar.bz2
minetest-105676b952484affdb97164eceaf4cb903955373.zip
Lua_api.txt: Clarify use of looping sounds
Diffstat (limited to 'src/porting.h')
0 files changed, 0 insertions, 0 deletions
a> 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131
/*
Minetest
Copyright (C) 2018 numzero, Lobachevskiy Vitaliy <numzer0@yandex.ru>

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 "exceptions.h"
#include "irr_ptr.h"

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

	void runTests(IGameDef *gamedef);

	void testRefCounting();
	void testSelfAssignment();
	void testNullHandling();
};

static TestIrrPtr g_test_instance;

void TestIrrPtr::runTests(IGameDef *gamedef)
{
	TEST(testRefCounting);
	TEST(testSelfAssignment);
	TEST(testNullHandling);
}

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

#define UASSERT_REFERENCE_COUNT(object, value, info)                                     \
	UTEST((object)->getReferenceCount() == value,                                    \