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

Add unitest

parent ca492964
......@@ -4,7 +4,7 @@ include_directories(
${CMAKE_SOURCE_DIR}/pimcommon
)
set( pimsettingexporterconsole_loginfiletest_SRCS loginfiletest.cpp )
set( pimsettingexporterconsole_loginfiletest_SRCS loginfiletest.cpp ../loginfile.cpp )
add_executable( pimsettingexporterconsole_loginfiletest ${pimsettingexporterconsole_loginfiletest_SRCS})
add_test( pimsettingexporterconsole_loginfiletest pimsettingexporterconsole_loginfiletest)
ecm_mark_as_test(pimsettingexporterconsole_loginfiletest)
......
......@@ -17,7 +17,7 @@
#include "loginfiletest.h"
#include <qtest.h>
#include "../loginfile.h"
LogInFileTest::LogInFileTest(QObject *parent)
: QObject(parent)
{
......@@ -29,4 +29,10 @@ LogInFileTest::~LogInFileTest()
}
void LogInFileTest::shouldHaveDefaultValue()
{
LogInFile logFile;
QVERIFY(logFile.fileName().isEmpty());
}
QTEST_MAIN(LogInFileTest)
......@@ -26,6 +26,8 @@ class LogInFileTest : public QObject
public:
explicit LogInFileTest(QObject *parent = Q_NULLPTR);
~LogInFileTest();
private Q_SLOTS:
void shouldHaveDefaultValue();
};
#endif // LOGINFILETEST_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