Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Unmaintained
KDE Pim
Commits
8c57858a
Commit
8c57858a
authored
Nov 23, 2014
by
Laurent Montel
😁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add more unittest
parent
3eb68ea4
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
147 additions
and
0 deletions
+147
-0
messagecomposer/tests/CMakeLists.txt
messagecomposer/tests/CMakeLists.txt
+2
-0
messagecomposer/tests/globalparttest.cpp
messagecomposer/tests/globalparttest.cpp
+42
-0
messagecomposer/tests/globalparttest.h
messagecomposer/tests/globalparttest.h
+32
-0
messagecomposer/tests/textparttest.cpp
messagecomposer/tests/textparttest.cpp
+39
-0
messagecomposer/tests/textparttest.h
messagecomposer/tests/textparttest.h
+32
-0
No files found.
messagecomposer/tests/CMakeLists.txt
View file @
8c57858a
...
@@ -63,6 +63,8 @@ add_messagecomposer_test( maintextjobtest.cpp )
...
@@ -63,6 +63,8 @@ add_messagecomposer_test( maintextjobtest.cpp )
add_messagecomposer_test( composertest.cpp )
add_messagecomposer_test( composertest.cpp )
add_messagecomposer_cryptotest( cryptocomposertest.cpp )
add_messagecomposer_cryptotest( cryptocomposertest.cpp )
add_messagecomposer_test( infoparttest.cpp )
add_messagecomposer_test( infoparttest.cpp )
add_messagecomposer_test( textparttest.cpp )
add_messagecomposer_test( globalparttest.cpp )
# Crypto
# Crypto
add_messagecomposer_cryptotest( signjobtest.cpp )
add_messagecomposer_cryptotest( signjobtest.cpp )
...
...
messagecomposer/tests/globalparttest.cpp
0 → 100644
View file @
8c57858a
/*
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 "globalparttest.h"
#include <qtest_kde.h>
#include <../part/globalpart.h>
GlobalPartTest
::
GlobalPartTest
(
QObject
*
parent
)
:
QObject
(
parent
)
{
}
GlobalPartTest
::~
GlobalPartTest
()
{
}
void
GlobalPartTest
::
shouldHaveDefaultValue
()
{
MessageComposer
::
GlobalPart
globalpart
;
QVERIFY
(
globalpart
.
isGuiEnabled
());
QVERIFY
(
!
globalpart
.
parentWidgetForGui
());
QVERIFY
(
!
globalpart
.
isFallbackCharsetEnabled
());
QVERIFY
(
!
globalpart
.
is8BitAllowed
());
QVERIFY
(
!
globalpart
.
MDNRequested
());
}
QTEST_KDEMAIN
(
GlobalPartTest
,
NoGUI
)
messagecomposer/tests/globalparttest.h
0 → 100644
View file @
8c57858a
/*
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 GLOBALPARTTEST_H
#define GLOBALPARTTEST_H
#include <QObject>
class
GlobalPartTest
:
public
QObject
{
Q_OBJECT
public:
explicit
GlobalPartTest
(
QObject
*
parent
=
0
);
~
GlobalPartTest
();
private
Q_SLOTS
:
void
shouldHaveDefaultValue
();
};
#endif // GLOBALPARTTEST_H
messagecomposer/tests/textparttest.cpp
0 → 100644
View file @
8c57858a
/*
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 "textparttest.h"
#include <qtest_kde.h>
#include <../part/textpart.h>
TextPartTest
::
TextPartTest
(
QObject
*
parent
)
:
QObject
(
parent
)
{
}
TextPartTest
::~
TextPartTest
()
{
}
void
TextPartTest
::
shouldHaveDefaultValue
()
{
MessageComposer
::
TextPart
textpart
;
QVERIFY
(
textpart
.
warnBadCharset
());
QVERIFY
(
textpart
.
isWordWrappingEnabled
());
}
QTEST_KDEMAIN
(
TextPartTest
,
NoGUI
)
messagecomposer/tests/textparttest.h
0 → 100644
View file @
8c57858a
/*
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 TEXTPARTTEST_H
#define TEXTPARTTEST_H
#include <QObject>
class
TextPartTest
:
public
QObject
{
Q_OBJECT
public:
explicit
TextPartTest
(
QObject
*
parent
=
0
);
~
TextPartTest
();
private
Q_SLOTS
:
void
shouldHaveDefaultValue
();
};
#endif // TEXTPARTTEST_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