aboutsummaryrefslogtreecommitdiff
path: root/build/android/res/drawable-ldpi
diff options
context:
space:
mode:
authorLoic Blot <loic.blot@unix-experience.fr>2016-03-30 00:06:47 +0200
committerest31 <MTest31@outlook.com>2016-03-30 17:20:24 +0200
commite082c7766afd2be8bf55b47e261544f7191bd0ed (patch)
treedd312161a55e3f25aef9a32f017f4da14d437d47 /build/android/res/drawable-ldpi
parent0aac1b74037ba0f6b0526e81ad0ea7367e31c224 (diff)
downloadminetest-e082c7766afd2be8bf55b47e261544f7191bd0ed.tar.gz
minetest-e082c7766afd2be8bf55b47e261544f7191bd0ed.tar.bz2
minetest-e082c7766afd2be8bf55b47e261544f7191bd0ed.zip
ParticleManager::handleParticleEvent: use switch
Use a proper switch with breaks.
Diffstat (limited to 'build/android/res/drawable-ldpi')
0 files changed, 0 insertions, 0 deletions
href='#n125'>125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182
/*
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 "threading/atomic.h"
#include "threading/semaphore.h"
#include "threading/thread.h"


class TestThreading : public TestBase {
public:
	TestThreading() { TestManager::registerTestModule(this); }
	const char *getName() { return "TestThreading"; }
	void runTests(IGameDef *gamedef);

	void testStartStopWait();
	void testThreadKill();
	void testAtomicSemaphoreThread();
};

static TestThreading g_test_instance;

void TestThreading::runTests(IGameDef *gamedef)
{
	TEST(testStartStopWait);
	TEST(testThreadKill);
	TEST(testAtomicSemaphoreThread);
}

class SimpleTestThread : public Thread {
public:
	SimpleTestThread(unsigned int interval) :
		Thread("SimpleTest"),
		m_interval(interval)
	{
	}

private:
	void *run()
	{
		void *retval = this;

		if (isCurrentThread() == false)
			retval = (void *)0xBAD;

		while (!stopRequested())
			sleep_ms(m_interval);

		return retval;
	}