Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Unmaintained
KDE Pim
Commits
79c09d44
Commit
79c09d44
authored
Jan 07, 2015
by
Laurent Montel
😁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add new unittest
parent
1386a54a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
79 additions
and
0 deletions
+79
-0
templateparser/tests/CMakeLists.txt
templateparser/tests/CMakeLists.txt
+1
-0
templateparser/tests/customtemplatesmenutest.cpp
templateparser/tests/customtemplatesmenutest.cpp
+44
-0
templateparser/tests/customtemplatesmenutest.h
templateparser/tests/customtemplatesmenutest.h
+34
-0
No files found.
templateparser/tests/CMakeLists.txt
View file @
79c09d44
...
...
@@ -30,6 +30,7 @@ macro(add_templateparser_unittest _source)
endmacro()
add_templateparser_unittest(templateparsertest.cpp)
add_templateparser_unittest(customtemplatesmenutest.cpp)
kde4_handle_crypto_rpath_for_executable( templateparsertest )
...
...
templateparser/tests/customtemplatesmenutest.cpp
0 → 100644
View file @
79c09d44
/*
Copyright (c) 2015 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 "customtemplatesmenutest.h"
#include "../customtemplatesmenu.h"
#include <kactioncollection.h>
#include <qtest_kde.h>
CustomTemplatesMenuTest
::
CustomTemplatesMenuTest
(
QObject
*
parent
)
:
QObject
(
parent
)
{
}
CustomTemplatesMenuTest
::~
CustomTemplatesMenuTest
()
{
}
void
CustomTemplatesMenuTest
::
shouldHaveDefaultValue
()
{
KActionCollection
*
collection
=
new
KActionCollection
(
this
);
TemplateParser
::
CustomTemplatesMenu
templateMenu
(
0
,
collection
);
QVERIFY
(
templateMenu
.
replyActionMenu
());
QVERIFY
(
templateMenu
.
replyAllActionMenu
());
QVERIFY
(
templateMenu
.
forwardActionMenu
());
}
QTEST_KDEMAIN
(
CustomTemplatesMenuTest
,
GUI
)
templateparser/tests/customtemplatesmenutest.h
0 → 100644
View file @
79c09d44
/*
Copyright (c) 2015 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 CUSTOMTEMPLATESMENUTEST_H
#define CUSTOMTEMPLATESMENUTEST_H
#include <QObject>
class
CustomTemplatesMenuTest
:
public
QObject
{
Q_OBJECT
public:
explicit
CustomTemplatesMenuTest
(
QObject
*
parent
=
0
);
~
CustomTemplatesMenuTest
();
private
Q_SLOTS
:
void
shouldHaveDefaultValue
();
};
#endif // CUSTOMTEMPLATESMENUTEST_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