ManaPlus
testlauncher.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_TESTLAUNCHER_H
23 #define TEST_TESTLAUNCHER_H
24 
25 #ifdef USE_OPENGL
26 
27 #include <fstream>
28 
29 #ifdef WIN32
30 #include <sys/time.h>
31 #endif // WIN32
32 
33 #ifdef __native_client__
34 #include <sys/time.h>
35 #endif // __native_client__
36 
37 #include "localconsts.h"
38 
40 {
41  public:
42  explicit TestLauncher(std::string test);
43 
45 
46  ~TestLauncher();
47 
48  int exec();
49 
50  int calcFps(const timeval &start,
51  const timeval &end,
52  const int calls) const;
53 
54  int testBackend() const;
55 
56  int testSound() const;
57 
58  int testRescale() const;
59 
60  int testFps();
61 
62  int testFps2();
63 
64  int testFps3();
65 
66  int testInternal();
67 
68  int testDye();
69 
70  int testVideoDetection();
71 
72  int testBatches();
73 
74  int testTextures();
75 
76  int testDraw();
77 
78  int testDyeSSpeed();
79 
80  int testDyeASpeed();
81 
82  int testStackSpeed();
83 
84  int testBlitSpeed();
85 
86  private:
87  std::string mTest;
88 
89  std::ofstream file;
90 };
91 
92 #endif // USE_OPENGL
93 #endif // TEST_TESTLAUNCHER_H
std::string mTest
Definition: testlauncher.h:87
int testInternal()
int testVideoDetection()
int testRescale() const
int calcFps(const timeval &start, const timeval &end, const int calls) const
int testSound() const
TestLauncher(std::string test)
std::ofstream file
Definition: testlauncher.h:89
int testStackSpeed()
int testBatches()
int testBackend() const
#define final
Definition: localconsts.h:46
#define A_DELETE_COPY(func)
Definition: localconsts.h:53