ManaPlus
testmain.h
Go to the documentation of this file.
1 /*
2  * The ManaPlus Client
3  * Copyright (C) 2011-2019 The ManaPlus Developers
4  * Copyright (C) 2019-2021 Andrei Karas
5  *
6  * This file is part of The ManaPlus Client.
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program. If not, see <http://www.gnu.org/licenses/>.
20  */
21 
22 #ifndef TEST_TESTMAIN_H
23 #define TEST_TESTMAIN_H
24 
25 #ifdef USE_OPENGL
26 
27 #include "configuration.h"
28 
29 #include "render/renderers.h"
30 
31 class Logger;
32 
34 {
35  public:
36  TestMain();
37 
39 
40  ~TestMain();
41 
42  int exec(const bool testAudio = true);
43 
44  static int readValue(const int ver, int def);
45 
47  { return mConfig; }
48 
49  private:
50  void initConfig();
51 
52  int invokeTest(const std::string &test);
53 
54  int invokeTest3();
55 
56  int invokeTest4();
57 
58  int invokeTest7();
59 
60  int invokeSoftwareRenderTest(const std::string &test);
61 
62  int invokeNormalOpenGLRenderTest(const std::string &test);
63 
64  int invokeNormalOpenBatchTest(const std::string &test);
65 
66  int invokeModernOpenGLRenderTest(const std::string &test);
67 
68  int invokeModernOpenBatchTest(const std::string &test);
69 
70  int invokeMobileOpenBatchTest(const std::string &test);
71 
72  int invokeSafeOpenBatchTest(const std::string &test);
73 
74  int invokeSafeOpenGLRenderTest(const std::string &test);
75 
76  void testsMain();
77 
79  const int rescale,
80  const int sound,
81  const std::string &info,
82  const int batchSize,
83  const std::string &textureSize,
84  const int detectMode);
85 
86  int readValue2(const int ver);
87 
89 
91 };
92 
93 #endif // USE_OPENGL
94 #endif // TEST_TESTMAIN_H
Definition: logger.h:69
Configuration mConfig
Definition: testmain.h:90
int invokeMobileOpenBatchTest(const std::string &test)
Definition: testmain.cpp:412
void initConfig()
Definition: testmain.cpp:55
void testsMain()
static int readValue(const int ver, int def)
Definition: testmain.cpp:326
int invokeNormalOpenGLRenderTest(const std::string &test)
Definition: testmain.cpp:376
int invokeTest7()
int readValue2(const int ver)
Definition: testmain.cpp:319
int invokeTest3()
int exec(const bool testAudio=true)
Definition: testmain.cpp:78
TestMain()
Definition: testmain.cpp:42
Logger * log
Definition: testmain.h:88
int invokeModernOpenGLRenderTest(const std::string &test)
Definition: testmain.cpp:385
int invokeTest(const std::string &test)
Definition: testmain.cpp:349
int invokeSafeOpenGLRenderTest(const std::string &test)
Definition: testmain.cpp:430
int invokeSoftwareRenderTest(const std::string &test)
Definition: testmain.cpp:367
void writeConfig(const RenderType openGLMode, const int rescale, const int sound, const std::string &info, const int batchSize, const std::string &textureSize, const int detectMode)
Definition: testmain.cpp:277
Configuration & getConfig()
Definition: testmain.h:46
~TestMain()
Definition: testmain.cpp:50
int invokeModernOpenBatchTest(const std::string &test)
Definition: testmain.cpp:403
int invokeTest4()
Definition: testmain.cpp:358
int invokeNormalOpenBatchTest(const std::string &test)
Definition: testmain.cpp:394
int invokeSafeOpenBatchTest(const std::string &test)
Definition: testmain.cpp:421
RenderType openGLMode
#define final
Definition: localconsts.h:46
#define A_DELETE_COPY(func)
Definition: localconsts.h:53
bool info(InputEvent &event)
Definition: commands.cpp:57
RenderType
Definition: rendertype.h:26