From d897ce42be8375ffab89615ab3953b8bd3ab3bbc Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Sun, 28 Feb 2010 12:22:25 +0100 Subject: All the other (blank) tests.. --- src/tests/mainwindow_test.cpp | 62 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 src/tests/mainwindow_test.cpp (limited to 'src/tests/mainwindow_test.cpp') diff --git a/src/tests/mainwindow_test.cpp b/src/tests/mainwindow_test.cpp new file mode 100644 index 00000000..f5342dfa --- /dev/null +++ b/src/tests/mainwindow_test.cpp @@ -0,0 +1,62 @@ +/* + * Copyright 2010 Andrea Diamantini + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * 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 + +#include +#include +#include + +#include "mainwindow.h" + + +class MainWindowTest : public QObject +{ + Q_OBJECT + +public slots: + void initTestCase(); + void cleanupTestCase(); + +private slots: + + +private: + MainWindow *window; +}; + + +// ------------------------------------------- + + +void MainWindowTest::initTestCase() +{ +} + + +void MainWindowTest::cleanupTestCase() +{ +} + +// ------------------------------------------- + +QTEST_MAIN(MainWindowTest) +#include "mainwindow_test.moc" -- cgit v1.2.1 From e5e4ffa0e844c4f1cbe40eeaa309c4711c1073e6 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Sun, 28 Feb 2010 17:05:37 +0100 Subject: 10 (of 12) tests working and ready to be "expanded".. --- src/tests/mainwindow_test.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/tests/mainwindow_test.cpp') diff --git a/src/tests/mainwindow_test.cpp b/src/tests/mainwindow_test.cpp index f5342dfa..90ae26bd 100644 --- a/src/tests/mainwindow_test.cpp +++ b/src/tests/mainwindow_test.cpp @@ -21,11 +21,12 @@ #include -#include #include -#include +#include +#include #include "mainwindow.h" +#include "application.h" class MainWindowTest : public QObject @@ -49,14 +50,16 @@ private: void MainWindowTest::initTestCase() { + window = new MainWindow; } void MainWindowTest::cleanupTestCase() { + delete window; } // ------------------------------------------- -QTEST_MAIN(MainWindowTest) +QTEST_KDEMAIN(MainWindowTest,GUI) #include "mainwindow_test.moc" -- cgit v1.2.1 From fbf6f37706a66bff0b61e0b854e3c4e123387db6 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Sun, 28 Feb 2010 17:07:05 +0100 Subject: Ok, commenting out (for now) problems with 2 failing tests.. --- src/tests/mainwindow_test.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/tests/mainwindow_test.cpp') diff --git a/src/tests/mainwindow_test.cpp b/src/tests/mainwindow_test.cpp index 90ae26bd..a37e9f16 100644 --- a/src/tests/mainwindow_test.cpp +++ b/src/tests/mainwindow_test.cpp @@ -50,13 +50,13 @@ private: void MainWindowTest::initTestCase() { - window = new MainWindow; +// window = new MainWindow; } void MainWindowTest::cleanupTestCase() { - delete window; +// delete window; } // ------------------------------------------- -- cgit v1.2.1 From d61a0d580b3f2835ab0292aecac8ebbdce8bec41 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Sun, 28 Feb 2010 17:12:09 +0100 Subject: Ok, we have 12 empty tests working... :) --- src/tests/mainwindow_test.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/tests/mainwindow_test.cpp') diff --git a/src/tests/mainwindow_test.cpp b/src/tests/mainwindow_test.cpp index a37e9f16..d3ab6bef 100644 --- a/src/tests/mainwindow_test.cpp +++ b/src/tests/mainwindow_test.cpp @@ -50,7 +50,7 @@ private: void MainWindowTest::initTestCase() { -// window = new MainWindow; + window = new MainWindow; } -- cgit v1.2.1