From c901469a7ead65b11c672ba7ab363acdd0bd778e Mon Sep 17 00:00:00 2001 From: ea4k Date: Sat, 20 Aug 2022 20:02:17 +0200 Subject: [PATCH] test update --- KLog.pro | 4 +-- tests/tst_dataproxy/tst_dataproxy.cpp | 42 ++++++++++++++++++++++----- 2 files changed, 37 insertions(+), 9 deletions(-) diff --git a/KLog.pro b/KLog.pro index ef08c2dd..71cb942c 100644 --- a/KLog.pro +++ b/KLog.pro @@ -23,8 +23,8 @@ # * * # *****************************************************************************/ TEMPLATE = subdirs -SUBDIRS += src -SUBDIRS += tests +SUBDIRS += src \ + tests #CONFIG(debug, debug) { # SUBDIRS += tests #} diff --git a/tests/tst_dataproxy/tst_dataproxy.cpp b/tests/tst_dataproxy/tst_dataproxy.cpp index 1271ba0f..e93d92ba 100644 --- a/tests/tst_dataproxy/tst_dataproxy.cpp +++ b/tests/tst_dataproxy/tst_dataproxy.cpp @@ -28,7 +28,13 @@ #include #include "../../src/dataproxy_sqlite.h" #include "../../src/utilities.h" - +/* + initTestCase() will be called before the first test function is executed. + initTestCase_data() will be called to create a global test data table. + cleanupTestCase() will be called after the last test function was executed. + init() will be called before each test function is executed. + cleanup() will be called after every test function. +*/ class tst_DataProxy : public QObject { Q_OBJECT @@ -38,12 +44,21 @@ public: ~tst_DataProxy(); private slots: - void initTestCase(); - void cleanupTestCase(); + //void initTestCase(); // will be called before the first test function is executed. + //void initTestCase_data(); // will be called to create a global test data table. + //void cleanupTestCase(); // will be called after the last test function was executed. + //void init(); // will be called before each test function is executed. + //void cleanup(); // will be called after every test function. void test_Constructor(); void test_modes_data(); void test_modes(); void test_bands(); + + + + + + //void test_getProgresStepForDialog(); private: @@ -61,19 +76,32 @@ tst_DataProxy::tst_DataProxy() tst_DataProxy::~tst_DataProxy() { - + qDebug() << Q_FUNC_INFO; + delete (util); + delete (dataProxy); } - +/* void tst_DataProxy::initTestCase() { - + qDebug() << Q_FUNC_INFO; } void tst_DataProxy::cleanupTestCase() { - + qDebug() << Q_FUNC_INFO; } +void tst_DataProxy::init() +{ + qDebug() << Q_FUNC_INFO; +} + +void tst_DataProxy::cleanup() +{ + qDebug() << Q_FUNC_INFO; +} +*/ + void tst_DataProxy::test_Constructor() { QVERIFY2(util->getVersion() == "0.0", "Version failed");