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 
30 namespace Testbed {
31 
32 // Shared variables used in mutex handling test
33 struct SharedVars {
34  int first;
35  int second;
36  bool resultSoFar;
37  Common::Mutex *mutex;
38 };
39 
40 namespace MiscTests {
41 
42 // Miscellaneous tests include testing datetime, timers and mutexes
43 
44 // Helper functions for Misc tests
45 Common::String getHumanReadableFormat(const TimeDate &td);
46 void timerCallback(void *arg);
47 void criticalSection(void *arg);
48 
49 // will contain function declarations for Misc tests
50 TestExitStatus testDateTime();
51 TestExitStatus testTimers();
52 TestExitStatus testMutexes();
53 TestExitStatus testOpenUrl();
54 TestExitStatus testImageAlbum();
55 // add more here
56 
57 } // End of namespace MiscTests
58 
59 class MiscTestSuite : public Testsuite {
60 public:
69  MiscTestSuite();
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: system.h:106
Definition: str.h:59
Definition: cloud.h:30
Definition: testsuite.h:90
Definition: mutex.h:67
Definition: misc.h:59
Definition: misc.h:33