ScummVM API documentation
misc.h
1/* ScummVM - Graphic Adventure Engine
2 *
3 * ScummVM is the legal property of its developers, whose names
4 * are too numerous to list here. Please refer to the COPYRIGHT
5 * file distributed with this source distribution.
6 *
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 *
20 */
21
22#ifndef TESTBED_MISC_H
23#define TESTBED_MISC_H
24
25#include "testbed/testsuite.h"
26
27#include "common/mutex.h"
28
29
30namespace Testbed {
31
32// Shared variables used in mutex handling test
33struct SharedVars {
34 int first;
35 int second;
36 bool resultSoFar;
37 Common::Mutex *mutex;
38};
39
40namespace MiscTests {
41
42// Miscellaneous tests include testing datetime, timers and mutexes
43
44// Helper functions for Misc tests
45Common::String getHumanReadableFormat(const TimeDate &td);
46void timerCallback(void *arg);
47void criticalSection(void *arg);
48
49// will contain function declarations for Misc tests
50TestExitStatus testDateTime();
51TestExitStatus testTimers();
52TestExitStatus testMutexes();
53TestExitStatus testOpenUrl();
54TestExitStatus testImageAlbum();
55// add more here
56
57} // End of namespace MiscTests
58
59class MiscTestSuite : public Testsuite {
60public:
70 ~MiscTestSuite() override {}
71 const char *getName() const override {
72 return "Misc";
73 }
74 const char *getDescription() const override {
75 return "Miscellaneous: Timers/Mutexes/Datetime/openUrl/ImageAlbum";
76 }
77};
78
79} // End of namespace Testbed
80
81#endif // TESTBED_MISC_H
Definition: mutex.h:67
Definition: str.h:59
Definition: misc.h:59
Definition: testsuite.h:96
Definition: misc.h:33
Definition: system.h:111