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/testdatetime.h"
25 #include "tests/testfilesearchpath.h"
26 #include "tests/testgamedemo.h"
27 #include "tests/testini.h"
28 #include "tests/testircisupportparser.h"
29 #include "tests/testmodreader.h"
30 #include "tests/testplayer.h"
31 #include "tests/teststrings.h"
32 #include "tests/testtemplatedpathresolver.h"
33 #include "tests/testutf8splitter.h"
34 
35 TestCore *TestRuns::pTestCore = nullptr;
36 
37 void TestRuns::callTests()
38 {
39  // DateTime
40  pTestCore->executeTest(new TestDateTimeISO8601());
43 
44  // GameDemo
45  pTestCore->executeTest(new TestGameDemoExportedName());
46  pTestCore->executeTest(new TestGameDemoImprintPath());
47  pTestCore->executeTest(new TestGameDemoManagedName());
48 
49  // INI
50  // Note: All of these tests may fail if TestReadINI fails.
51  pTestCore->executeTest(new TestReadINI());
52  pTestCore->executeTest(new TestReadINIVariable());
53  pTestCore->executeTest(new TestDeleteINISection());
54  pTestCore->executeTest(new TestDeleteINIVariable());
55 
56  // IRC
57  pTestCore->executeTest(new TestIRCISupportPrefix());
58  pTestCore->executeTest(new TestIRCISupportNoPrefix());
59 
60  // FileSearchPath
62  pTestCore->executeTest(new TestFileSearchPathMerge);
63 
64  // Strings
65  pTestCore->executeTest(new TestStringsWrapUrls());
66 
67  // Templated Path Resolver
68  pTestCore->executeTest(new TestTemplatedPathResolver());
69 
70  // WadReader.
71  pTestCore->executeTest(new TestModReader());
72 
73  // Misc.
74  pTestCore->executeTest(new TestUtf8Splitter());
75  pTestCore->executeTest(new TestPlayerNameColorStrip());
76 }