Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 539d0090 authored by Laurent Montel's avatar Laurent Montel 😁

improve unittest

parent 24e8418c
set( EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR} )
include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/../.. )
set( knotes_knotesgrantleeprint_source knotesgrantleeprinttest.cpp )
kde4_add_unit_test( knotesgrantleeprinttest ${knotes_knotesgrantleeprint_source})
target_link_libraries( knotesgrantleeprinttest ${QT_QTTEST_LIBRARY} ${KDE4_KDECORE_LIBS} ${QT_QTGUI_LIBRARY} ${KDEPIMLIBS_AKONADI_LIBS} ${KDEPIMLIBS_KIMAP_LIBS})
target_link_libraries( knotesgrantleeprinttest ${QT_QTTEST_LIBRARY} ${KDE4_KDECORE_LIBS} ${QT_QTGUI_LIBRARY} ${KDEPIMLIBS_AKONADI_LIBS} knotesprivate)
......@@ -17,6 +17,7 @@
#include "knotesgrantleeprinttest.h"
#include "../knotegrantleeprint.h"
#include <qtest_kde.h>
KNotesGrantleePrintTest::KNotesGrantleePrintTest(QObject *parent)
......@@ -30,4 +31,12 @@ KNotesGrantleePrintTest::~KNotesGrantleePrintTest()
}
void KNotesGrantleePrintTest::shouldDefaultValue()
{
KNoteGrantleePrint *grantleePrint = new KNoteGrantleePrint;
QVERIFY(grantleePrint);
grantleePrint->deleteLater();
grantleePrint = 0;
}
QTEST_KDEMAIN(KNotesGrantleePrintTest, NoGUI)
......@@ -26,6 +26,8 @@ class KNotesGrantleePrintTest : public QObject
public:
explicit KNotesGrantleePrintTest(QObject *parent = 0);
~KNotesGrantleePrintTest();
private Q_SLOTS:
void shouldDefaultValue();
};
#endif // KNOTESGRANTLEEPRINTTEST_H
......@@ -20,12 +20,12 @@
#include <QObject>
#include <grantlee/templateloader.h>
#include "knotes_export.h"
namespace Grantlee {
class Engine;
}
class KNotePrintObject;
class KNoteGrantleePrint : public QObject
class KNOTES_EXPORT KNoteGrantleePrint : public QObject
{
Q_OBJECT
public:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment