Debian Codegraph @

Source/Test/CReasonerTestsuiteTest.cpp

raw
1 /*
2 * Copyright (C) 2013-2015, 2019 by the Konclude Developer Team.
3 *
4 * This file is part of the reasoning system Konclude.
5 * For details and support, see <http://konclude.com/>.
6 *
7 * Konclude is free software: you can redistribute it and/or modify
8 * it under the terms of version 3 of the GNU Lesser General Public
9 * License (LGPLv3) as published by the Free Software Foundation.
10 *
11 * Konclude is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU (Lesser) General Public License for more details.
15 *
16 * You should have received a copy of the GNU (Lesser) General Public
17 * License along with Konclude. If not, see <http://www.gnu.org/licenses/>.
18 *
19 */
20
21 #include "CReasonerTestsuiteTest.h"
22
23
24 namespace Konclude {
25
26 namespace Test {
27
28
29
30 CReasonerTestsuiteTest::CReasonerTestsuiteTest() {
31 testExeCount = 1;
32 timeout = 0;
33 }
34
35
36 CReasonerTestsuiteTest::~CReasonerTestsuiteTest() {
37 qDeleteAll(testList);
38 }
39
40
41 CReasonerTestsuiteTestResult *CReasonerTestsuiteTest::getTestsuiteResult() {
42 return &testsuiteResult;
43 }
44
45
46 qint64 CReasonerTestsuiteTest::getDefaultTestLoopCount() {
47 return testExeCount;
48 }
49
50 CReasonerTestsuiteTest *CReasonerTestsuiteTest::setDefaultTestLoopCount(qint64 loopCount) {
51 testExeCount = loopCount;
52 return this;
53 }
54
55 QString CReasonerTestsuiteTest::getDefaultWorkingDirectory() {
56 return workDir;
57 }
58
59 CReasonerTestsuiteTest *CReasonerTestsuiteTest::setDefaultWorkingDirectory(const QString &workingDir) {
60 workDir = workingDir;
61 return this;
62 }
63
64 bool CReasonerTestsuiteTest::hasDefaultWorkingDirectory() {
65 return !workDir.isEmpty();
66 }
67
68 CReasonerTestfileTest *CReasonerTestsuiteTest::createTestfileTest() {
69 CReasonerTestfileTest *test = new CReasonerTestfileTest();
70 testList.append(test);
71 if (hasDefaultWorkingDirectory()) {
72 test->setWorkingDirectory(getDefaultWorkingDirectory());
73 }
74 test->setTestLoopCount(getDefaultTestLoopCount());
75 test->setTimeout(timeout);
76 return test;
77 }
78
79 QLinkedList<CReasonerTestfileTest *> CReasonerTestsuiteTest::getTestfileTestList() {
80 return testList;
81 }
82
83
84 qint64 CReasonerTestsuiteTest::getDefaultTimeout() {
85 return timeout;
86 }
87
88 CReasonerTestsuiteTest *CReasonerTestsuiteTest::setDefaultTimeout(qint64 defTimeout) {
89 timeout = defTimeout;
90 return this;
91 }
92
93
94
95 }; // end namespace Test
96
97 }; // end namespace Konclude