Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
KDE Pim
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Unmaintained
KDE Pim
Commits
8b6b160b
Commit
8b6b160b
authored
Dec 30, 2014
by
Laurent Montel
😁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add more unittest
parent
c97b13eb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
83 additions
and
0 deletions
+83
-0
messagecore/tests/CMakeLists.txt
messagecore/tests/CMakeLists.txt
+5
-0
messagecore/tests/mdnstateattributetest.cpp
messagecore/tests/mdnstateattributetest.cpp
+44
-0
messagecore/tests/mdnstateattributetest.h
messagecore/tests/mdnstateattributetest.h
+34
-0
No files found.
messagecore/tests/CMakeLists.txt
View file @
8b6b160b
...
...
@@ -25,3 +25,8 @@ add_messagecore_test( attachmentupdatejobtest.cpp )
add_messagecore_test
(
stringutiltest.cpp
)
add_messagecore_test
(
mailinglisttest.cpp
)
set
(
mdnstateattributetest_source mdnstateattributetest.cpp ../misc/mdnstateattribute.cpp
)
kde4_add_unit_test
(
mdnstateattributetest
${
mdnstateattributetest_source
}
)
target_link_libraries
(
mdnstateattributetest
${
QT_QTTEST_LIBRARY
}
${
KDE4_KDECORE_LIBS
}
${
QT_QTGUI_LIBRARY
}
${
KDEPIMLIBS_AKONADI_LIBS
}
)
messagecore/tests/mdnstateattributetest.cpp
0 → 100644
View file @
8b6b160b
/*
Copyright (c) 2014 Montel Laurent <montel@kde.org>
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License, version 2, as
published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "mdnstateattributetest.h"
#include "../misc/mdnstateattribute.h"
#include <qtest_kde.h>
MDNStateAttributeTest
::
MDNStateAttributeTest
(
QObject
*
parent
)
:
QObject
(
parent
)
{
}
MDNStateAttributeTest
::~
MDNStateAttributeTest
()
{
}
void
MDNStateAttributeTest
::
shouldHaveDefaultValue
()
{
MessageCore
::
MDNStateAttribute
attr
;
QCOMPARE
(
attr
.
mdnState
(),
MessageCore
::
MDNStateAttribute
::
MDNStateUnknown
);
}
void
MDNStateAttributeTest
::
shouldHaveType
()
{
MessageCore
::
MDNStateAttribute
attr
;
QCOMPARE
(
attr
.
type
(),
QByteArray
(
"MDNStateAttribute"
));
}
QTEST_KDEMAIN
(
MDNStateAttributeTest
,
NoGUI
)
messagecore/tests/mdnstateattributetest.h
0 → 100644
View file @
8b6b160b
/*
Copyright (c) 2014 Montel Laurent <montel@kde.org>
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License, version 2, as
published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef MDNSTATEATTRIBUTETEST_H
#define MDNSTATEATTRIBUTETEST_H
#include <QObject>
class
MDNStateAttributeTest
:
public
QObject
{
Q_OBJECT
public:
explicit
MDNStateAttributeTest
(
QObject
*
parent
=
0
);
~
MDNStateAttributeTest
();
private
Q_SLOTS
:
void
shouldHaveDefaultValue
();
void
shouldHaveType
();
};
#endif // MDNSTATEATTRIBUTETEST_H
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment