# # # add_dir "tests" # # add_file "tests/TestTest.h" # content [959d6b457a8919d6d4ab71a7f01f413b24bc70b4] # # add_file "tests/test.cpp" # content [1bc1c23455d91468e22f229dffa8fcee9277a8a9] # # add_file "tests/test.pro" # content [5005bf499b91c8cf6e51e3c74915ee1d9069a312] # # patch ".mtn-ignore" # from [c5f2049b1e1835cb2dae0227264e739966b30248] # to [2b3f6042331d17d47b150099b59331c4fd43c525] # ============================================================ --- tests/TestTest.h 959d6b457a8919d6d4ab71a7f01f413b24bc70b4 +++ tests/TestTest.h 959d6b457a8919d6d4ab71a7f01f413b24bc70b4 @@ -0,0 +1,16 @@ + +#include + +class TestTest: public QObject +{ + Q_OBJECT + +private slots: + void initTestCase() { qDebug("testcase initiated"); } + void myFirstTest() { QVERIFY(1 == 1); } + void mySecondTest() { QVERIFY(1 != 2); } + void cleanupTestCase() { qDebug("testcase cleaned"); } + void init() { qDebug("init before each test"); } + void cleanup() { qDebug("cleanup after each test"); } +}; + ============================================================ --- tests/test.cpp 1bc1c23455d91468e22f229dffa8fcee9277a8a9 +++ tests/test.cpp 1bc1c23455d91468e22f229dffa8fcee9277a8a9 @@ -0,0 +1,10 @@ + +#include "TestTest.h" + +int main(int argc, char** argv) +{ + QCoreApplication app(argc, argv); + + QTest::qExec(&TestTest(), argc, argv); +} + ============================================================ --- tests/test.pro 5005bf499b91c8cf6e51e3c74915ee1d9069a312 +++ tests/test.pro 5005bf499b91c8cf6e51e3c74915ee1d9069a312 @@ -0,0 +1,19 @@ +TEMPLATE = app +TARGET = test +CONFIG += qt debug qtestlib + +INCLUDEPATH = . \ + ../guitone/src/ \ + ../guitone/src/view \ + ../guitone/src/view/dialogs \ + ../guitone/src/model \ + ../guitone/src/monotone \ + ../guitone/src/util +HEADERS += TestTest.h +SOURCES += test.cpp + +OBJECTS_DIR = tmp +MOC_DIR = tmp +RCC_DIR = tmp + + ============================================================ --- .mtn-ignore c5f2049b1e1835cb2dae0227264e739966b30248 +++ .mtn-ignore 2b3f6042331d17d47b150099b59331c4fd43c525 @@ -6,3 +6,5 @@ guitone\/bin/.* guitone\/bin/.* \.moc \.obj +tests/tmp +tests/test$