Commit eb273d60 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Start to create unittest for notes

parent 2a2416e5
add_subdirectory(apps)
set( EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR} )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${KDE4_ENABLE_EXCEPTIONS}")
include_directories(
${CMAKE_SOURCE_DIR}/pimcommon
${CMAKE_SOURCE_DIR}/noteshared
${CMAKE_BINARY_DIR}/noteshared
)
include ( ${CMAKE_SOURCE_DIR}/cmake/modules/kde4_handle_crypto_rpath_for_executable.cmake )
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${KDE4_ENABLE_EXCEPTIONS}")
set(knotes_akonadi_SRCS main.cpp
knotesakonaditray.cpp
knotesakonadiapp.cpp
knoteakonadinote.cpp
)
kde4_add_executable(knotes_akonadi_test TEST ${knotes_akonadi_SRCS})
target_link_libraries(knotes_akonadi_test
${QT_QTTEST_LIBRARY}
${QT_QTCORE_LIBRARY}
${QT_QTGUI_LIBRARY}
${KDE4_KDECORE_LIBS}
${KDE4_KDEUI_LIBS}
${KDEPIMLIBS_AKONADI_LIBS}
${KDEPIMLIBS_KMIME_LIBS}
akonadi_next
noteshared
)
# convenience macro to add qtest unit tests
macro(add_knotes_unittest _source)
set(_test ${_source} )
get_filename_component(_name ${_source} NAME_WE)
kde4_add_unit_test(${_name} TESTNAME knotes-${_name} ${_test} )
target_link_libraries( ${_name}
${QT_QTTEST_LIBRARY}
${QT_QTCORE_LIBRARY}
${KDE4_KIO_LIBS}
)
endmacro ()
add_knotes_unittest( notetest.cpp )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${KDE4_ENABLE_EXCEPTIONS}")
include_directories(
${CMAKE_SOURCE_DIR}/pimcommon
${CMAKE_SOURCE_DIR}/noteshared
${CMAKE_BINARY_DIR}/noteshared
)
set(knotes_akonadi_SRCS main.cpp
knotesakonaditray.cpp
knotesakonadiapp.cpp
knoteakonadinote.cpp
)
kde4_add_executable(knotes_akonadi_test TEST ${knotes_akonadi_SRCS})
target_link_libraries(knotes_akonadi_test
${QT_QTTEST_LIBRARY}
${QT_QTCORE_LIBRARY}
${QT_QTGUI_LIBRARY}
${KDE4_KDECORE_LIBS}
${KDE4_KDEUI_LIBS}
${KDEPIMLIBS_AKONADI_LIBS}
${KDEPIMLIBS_KMIME_LIBS}
akonadi_next
noteshared
)
/*
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 "notetest.h"
#include <qtest_kde.h>
NoteTest::NoteTest()
{
}
QTEST_KDEMAIN( NoteTest, GUI )
/*
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 NOTETEST_H
#define NOTETEST_H
#include <QObject>
class NoteTest : public QObject
{
Q_OBJECT
public:
NoteTest();
private slots:
};
#endif // NOTETEST_H
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