2 * This file is part of KDevelop
3 * Copyright 2008 Manuel Breugelmans <mbr.nxi@gmail.com>
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 2
8 * of the License, or (at your option) any later version.
10 * This program 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
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21 #ifndef VERITAS_TESTRESULT_H
22 #define VERITAS_TESTRESULT_H
24 #include "veritas/veritasexport.h"
26 #include <QtCore/QList>
27 #include <QtCore/QString>
28 #include <QtCore/QVariant>
29 #include <QtCore/QFileInfo>
30 #include <QtCore/QByteArray>
38 NoResult
= 0, //!< No result available, not run
46 const int AllStates
= RunSuccess
| RunSuccess
| RunError
| RunFatal
| RunException
| RunInfo
;
48 class TestResultPrivate
;
51 /*! Holds state, descriptive message and location */
52 class VERITAS_EXPORT TestResult
55 explicit TestResult(TestState state
= Veritas::NoResult
, const QString
& message
= "",
56 int line
= 0, const KUrl
& = KUrl());
57 virtual ~TestResult();
59 TestState
state() const;
60 QString
message() const;
64 void setState(TestState
);
65 void setMessage(const QString
&);
67 void setFile(const KUrl
&);
72 TestResult
* child(int i
);
73 void appendChild(TestResult
*);
75 void setOwner(Test
* t
);
79 TestResult
& operator=(const TestResult
&);
80 TestResult(const TestResult
&);
83 TestResultPrivate
* const d
;
88 #endif // VERITAS_TESTRESULT_H