Fix no newlines warnings. Patch by Peter Oberndorfer
[kdevelopdvcssupport.git] / veritas / testresult.h
blobee81e31f68651e6018e4c8e8524912c0f2ea9af5
1 /*
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
18 * 02110-1301, USA.
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>
31 #include <KUrl>
33 namespace Veritas
36 enum TestState
38 NoResult = 0, //!< No result available, not run
39 RunSuccess = 1,
40 RunError = 2,
41 RunFatal = 4,
42 RunException = 8,
43 RunInfo = 16
46 const int AllStates = RunSuccess | RunSuccess | RunError | RunFatal | RunException | RunInfo;
48 class TestResultPrivate;
49 class Test;
51 /*! Holds state, descriptive message and location */
52 class VERITAS_EXPORT TestResult
54 public:
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;
61 int line() const;
62 KUrl file() const;
64 void setState(TestState);
65 void setMessage(const QString&);
66 void setLine(int);
67 void setFile(const KUrl&);
69 void clear();
71 int childCount();
72 TestResult* child(int i);
73 void appendChild(TestResult*);
75 void setOwner(Test* t);
76 Test* owner() const;
78 private:
79 TestResult& operator=(const TestResult&);
80 TestResult(const TestResult&);
82 private:
83 TestResultPrivate* const d;
88 #endif // VERITAS_TESTRESULT_H