# # # delete "tests/MonotoneTest.h" # # delete "tests/TestTest.h" # # rename "tests/StdioParserTest.h" # to "tests/tst_StdioParser.h" # # add_file "tests/tst_MonotoneTask.h" # content [6b57b084b81786e0c697decf8da3042f70104e95] # # patch "tests/test.cpp" # from [8c345925e352aea61e5f51a0b2ad01fb6475c282] # to [a274e6d097a56ac9f7b689b8ad12b6602c258a88] # # patch "tests/test.pro" # from [b437a3ca1b89faa23f2665324caa1a2f121184a3] # to [d2a23cf863f23fa30afccae92bb0b29d7d965e05] # # patch "tests/tst_StdioParser.h" # from [3974e240f162fc6cebbd6df97c3f36ed0440817d] # to [c4a8c0679b3b3c3df85aa41596233d9f6a973af5] # ============================================================ --- tests/tst_MonotoneTask.h 6b57b084b81786e0c697decf8da3042f70104e95 +++ tests/tst_MonotoneTask.h 6b57b084b81786e0c697decf8da3042f70104e95 @@ -0,0 +1,78 @@ +/**************************************************************************** +** +** Copyright (C) 2007-$THISYEAR$ $TROLLTECH$. All rights reserved. +** +** This file is part of the $MODULE$ of the Qt Toolkit. +** +** $TROLLTECH_DUAL_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + +#include +#include "MonotoneThread.h" + +Q_DECLARE_METATYPE(ByteArrayList) + +class tst_MonotoneTask : public QObject +{ + Q_OBJECT + +private: + // Subclass that exposes the protected functions. + class SubMonotoneTask : public MonotoneTask {}; + +public slots: + void initTestCase() {} + void cleanupTestCase() {} + void init() {} + void cleanup() {} + +private slots: + void monotonetask_data() {} + + void monotonetask() + { + SubMonotoneTask task; + /* + task.getArguments(); + task.getCommandNumber(); + task.getEncodedInput(); + task.getOptions(); + task.getOutput(); + task.getOutputUtf8(); + task.getReturnCode(); + task.getThreadNumber(); + task.isFinished(); + task.setCommandNumber(); + task.setFinished(); + task.setOutput(); + task.setReturnCode(); + task.setThreadNumber(); + */ + QSKIP("Test is not implemented.", SkipAll); + } + + void getArguments_data() + { + /* + QTest::addColumn("getArguments"); + QTest::newRow("null") << ByteArrayList(); + */ + } + + // public ByteArrayList getArguments() const + void getArguments() + { + /* + QFETCH(ByteArrayList, getArguments); + + SubMonotoneTask task; + + QCOMPARE(task.getArguments(), getArguments); + */ + QSKIP("Test is not implemented.", SkipAll); + } +}; ============================================================ --- tests/test.cpp 8c345925e352aea61e5f51a0b2ad01fb6475c282 +++ tests/test.cpp a274e6d097a56ac9f7b689b8ad12b6602c258a88 @@ -1,18 +1,15 @@ #include +#include "tst_StdioParser.h" +#include "tst_MonotoneTask.h" #define TEST(name, argc, argv) QTest::qExec(new name(), argc, argv); -#include "TestTest.h" -#include "StdioParserTest.h" -#include "MonotoneTest.h" - int main(int argc, char** argv) { - QCoreApplication app(argc, argv); + QCoreApplication app(argc, argv); - TEST(TestTest, argc, argv); - TEST(StdioParserTest, argc, argv); - TEST(MonotoneTest, argc, argv); + TEST(tst_StdioParser, argc, argv); + TEST(tst_MonotoneTask, argc, argv); } ============================================================ --- tests/test.pro b437a3ca1b89faa23f2665324caa1a2f121184a3 +++ tests/test.pro d2a23cf863f23fa30afccae92bb0b29d7d965e05 @@ -1,25 +1,23 @@ CONFIG += qtestlib TEMPLATE = app TARGET = test CONFIG += qtestlib -macx:CONFIG -= app_bundle +macx:CONFIG -= app_bundle -INCLUDEPATH = . \ - ../src/ \ - ../src/view \ - ../src/view/dialogs \ - ../src/model \ - ../src/monotone \ - ../src/util -HEADERS += TestTest.h \ - StdioParserTest.h \ - MonotoneTest.h \ - ../src/monotone/Monotone.h \ - ../src/util/SignalWaiter.h +tst_INCLUDE_DIRS = $$system(find ../src -type d) +INCLUDEPATH = . $$tst_INCLUDE_DIRS + +tst_FILES = $$system(ls tst*.h) +HEADERS += $$tst_FILES +SOURCES += $$tst_FILES + +HEADERS += ../src/monotone/MonotoneThread.h + SOURCES += test.cpp \ ../src/util/StdioParser.cpp \ ../src/util/AbstractParser.cpp \ - ../src/monotone/Monotone.cpp \ - ../src/util/SignalWaiter.cpp + ../src/util/DebugLog.cpp \ + ../src/util/Settings.cpp \ + ../src/monotone/MonotoneThread.cpp OBJECTS_DIR = tmp MOC_DIR = tmp ============================================================ --- tests/StdioParserTest.h 3974e240f162fc6cebbd6df97c3f36ed0440817d +++ tests/tst_StdioParser.h c4a8c0679b3b3c3df85aa41596233d9f6a973af5 @@ -15,7 +15,7 @@ */ -class StdioParserTest: public QObject +class tst_StdioParser: public QObject { Q_OBJECT