testruns.cpp
1 //------------------------------------------------------------------------------
2 // testruns.cpp
3 //------------------------------------------------------------------------------
4 //
5 // This library is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU Lesser General Public
7 // License as published by the Free Software Foundation; either
8 // version 2.1 of the License, or (at your option) any later version.
9 //
10 // This library is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 // Lesser General Public License for more details.
14 //
15 // You should have received a copy of the GNU Lesser General Public
16 // License along with this library; if not, write to the Free Software
17 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18 // 02110-1301 USA
19 //
20 //------------------------------------------------------------------------------
21 // Copyright (C) 2010 "Zalewa" <zalewapl@gmail.com>
22 //------------------------------------------------------------------------------
23 #include "testruns.h"
24 #include "tests/testdatapaths.h"
25 #include "tests/testini.h"
26 #include "tests/testircisupportparser.h"
27 #include "tests/testmodreader.h"
28 #include "tests/testplayer.h"
29 #include "tests/teststrings.h"
30 #include "tests/testutf8splitter.h"
31 
32 TestCore *TestRuns::pTestCore = nullptr;
33 
34 void TestRuns::callTests()
35 {
36  // DataPaths
37  pTestCore->executeTest(new TestDataPathsAppDataDirectoryAccess(false));
39 
40  pTestCore->executeTest(new TestDataPathsAppDataDirectoryWrite(false));
41  pTestCore->executeTest(new TestDataPathsAppDataDirectoryWrite(true));
42 
43  // INI
44  // Note: All of these tests may fail if TestReadINI fails.
45  pTestCore->executeTest(new TestReadINI());
46  pTestCore->executeTest(new TestReadINIVariable());
47  pTestCore->executeTest(new TestDeleteINISection());
48  pTestCore->executeTest(new TestDeleteINIVariable());
49  pTestCore->executeTest(new TestStringsWrapUrls());
50 
51  pTestCore->executeTest(new TestIRCISupportPrefix());
52  pTestCore->executeTest(new TestIRCISupportNoPrefix());
53 
54 
55  // WadReader.
56  pTestCore->executeTest(new TestModReader());
57 
58  // Misc.
59  pTestCore->executeTest(new TestUtf8Splitter());
60  pTestCore->executeTest(new TestPlayerNameColorStrip());
61 }