--- /dev/null
+#!/bin/bash
+
+##########################################################
+# This script is executed from /scripts directory #
+# in situare project folder #
+##########################################################
+clear
+echo "This is the master script for building and executing all automatic unit test."
+echo "As a final step, it creates summary report from all tests executed."
+##########################################################
+#Environment settings #
+##########################################################
+#Store all directory names to a list
+MODULES=(`ls ../tests/`)
+#Modify this path to point to correct path
+location=$HOME/situare/repository/situare/tests/
+FILE=$HOME/situare/repository/situare/scripts/tests_summary.txt
+if [ ! -e $FILE ]; then
+ touch tests_summary.txt
+ echo "##########################################" >> tests_summary.txt
+ echo "# Summary of unit tests executed #" >> tests_summary.txt
+ echo "# Date: `date` #" >> tests_summary.txt
+ echo "# User: `whoami` #" >> tests_summary.txt
+ echo "##########################################" >> tests_summary.txt
+fi
+
+##########################################################
+#First part: Execution of all tests #
+##########################################################
+for component in "${MODULES[@]}" #Loop through components
+do
+ cd $location/$component
+ CASES=(`ls`) #List all test cases uner component directory
+ for unittest in "${CASES[@]}"
+ do
+ cd $location/$component/$unittest
+ if [ $component = "testMap" ]; then
+ qmake
+ else
+ qmake -project "CONFIG+=qtestlib"
+ echo "Creating make file for $component/$unittest"
+ qmake
+ fi
+ echo "Building tests for $component/$unittest"
+ make
+ echo "Running tests for $component/$unittest"
+ ./$unittest -o testreport_$component.txt
+ echo "Cleaning $unittest"
+ make clean
+ rm Makefile
+ rm $unittest
+ done
+done
+
+#########################################################
+# Second part: Extraction of results #
+#########################################################
+echo "Summarizing test results....."
+for component in "${MODULES[@]}" #Loop through components
+do
+ cd $location/$component
+ CASES=(`ls`) #List all test cases uner component directory
+ for unittests in "${CASES[@]}"
+ do
+ cd $location/$component/$unittests
+ echo "############# $component/$unittests ################" >> $FILE
+ grep Totals *.txt >> $FILE
+ done
+done
+exit 0
--- /dev/null
+ /*
+ Situare - A location system for Facebook
+ Copyright (C) 2010 Ixonos Plc. Authors:
+
+ Sami Rämö - sami.ramo@ixonos.com
+
+ Situare 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.
+
+ Situare 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 Situare; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+ USA.
+ */
+
+#include <math.h>
+
+#include "mapengine.h"
+#include "maptile.h"
+
+MapEngine::MapEngine()
+{
+}
+
+MapEngine::MapEngine(MapView *mapView)
+{
+// m_mapView = mapView;
+// m_mapScene = new MapScene();
+// mapView->setScene(m_mapScene);
+//
+// /// \todo remove debug data
+// for (int x=4261; x<=4264; x++) {
+// for (int y=9352; y<=9353; y++) {
+// MapTile *mapTile = new MapTile();
+// mapTile->setZoomLevel(14);
+// mapTile->setTileXY(x, y);
+// mapTile->setPixmap(QPixmap("/home/ramosam-local/situare/src/map/static_test_tiles/14_9352_4261.png"));
+// mapTile->setOffset((x-4261)*256, (y-9352)*256);
+// m_mapScene->addMapTile(mapTile);
+// }
+// }
+}
+
+QPoint MapEngine::convertTileNumberToSceneCoordinate(int zoomLevel, QPoint tileNumber)
+{
+ int x = tileNumber.x() * TILE_SIZE_X * pow(2, MAX_ZOOM_LEVEL - zoomLevel);
+ int y = tileNumber.y() * TILE_SIZE_Y * pow(2, MAX_ZOOM_LEVEL - zoomLevel);
+
+ return QPoint(x, y);
+}
--- /dev/null
+ /*
+ Situare - A location system for Facebook
+ Copyright (C) 2010 Ixonos Plc. Authors:
+
+ Sami Rämö - sami.ramo@ixonos.com
+
+ Situare 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.
+
+ Situare 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 Situare; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+ USA.
+ */
+
+
+#ifndef MAPENGINE_H
+#define MAPENGINE_H
+
+#include "mapview.h"
+#include "mapscene.h"
+
+class MapEngine
+{
+public:
+ MapEngine();
+ MapEngine(MapView *mapView);
+ QPoint convertTileNumberToSceneCoordinate(int zoomLevel, QPoint tileNumber);
+
+public:
+ static const int TILE_SIZE_X = 256;
+ static const int TILE_SIZE_Y = 256;
+ static const int MAX_ZOOM_LEVEL = 18;
+
+private:
+ MapView *m_mapView;
+ MapScene *m_mapScene;
+};
+
+#endif // MAPENGINE_H
--- /dev/null
+ /*
+ Situare - A location system for Facebook
+ Copyright (C) 2010 Ixonos Plc. Authors:
+
+ Sami Rämö - sami.ramo@ixonos.com
+
+ Situare 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.
+
+ Situare 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 Situare; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+ USA.
+ */
+
+
+#include "mapscene.h"
+
+MapScene::MapScene(QObject *parent) : QGraphicsScene(parent)
+{
+}
+
+void MapScene::addMapTile(MapTile *mapTile)
+{
+// /// \todo set offset & transfor (=zoom)
+// mapTile->setOffset(x, y);
+// //mapTile->setTransform();
+// addItem(mapTile);
+}
--- /dev/null
+ /*
+ Situare - A location system for Facebook
+ Copyright (C) 2010 Ixonos Plc. Authors:
+
+ Sami Rämö - sami.ramo@ixonos.com
+
+ Situare 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.
+
+ Situare 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 Situare; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+ USA.
+ */
+
+
+#ifndef MAPSCENE_H
+#define MAPSCENE_H
+
+#include <QGraphicsScene>
+
+#include "map/maptile.h"
+
+
+class MapScene : public QGraphicsScene
+{
+public:
+
+ MapScene(QObject *parent = 0);
+ void addMapTile(MapTile *mapTile);
+};
+
+#endif // MAPSCENE_H
--- /dev/null
+ /*
+ Situare - A location system for Facebook
+ Copyright (C) 2010 Ixonos Plc. Authors:
+
+ Sami Rämö - sami.ramo@ixonos.com
+
+ Situare 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.
+
+ Situare 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 Situare; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+ USA.
+ */
+
+
+#include "maptile.h"
+
+MapTile::MapTile()
+{
+}
+
+quint8 MapTile::zoomLevel()
+{
+ return m_zoomLevel;
+}
+
+void MapTile::setZoomLevel(quint8 zoomLevel)
+{
+ m_zoomLevel = zoomLevel;
+}
+
+QPoint MapTile::tileNumber()
+{
+ return m_tileNumber;
+}
+
+void MapTile::setTileNumber(QPoint tileNumber)
+{
+ m_tileNumber = tileNumber;
+}
--- /dev/null
+ /*
+ Situare - A location system for Facebook
+ Copyright (C) 2010 Ixonos Plc. Authors:
+
+ Sami Rämö - sami.ramo@ixonos.com
+
+ Situare 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.
+
+ Situare 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 Situare; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+ USA.
+ */
+
+
+#ifndef MAPTILE_H
+#define MAPTILE_H
+
+#include <QGraphicsPixmapItem>
+#include <QPoint>
+
+class MapTile : public QGraphicsPixmapItem
+{
+public:
+ MapTile();
+ quint8 zoomLevel();
+ void setZoomLevel(quint8 zoomLevel);
+ QPoint tileNumber();
+ void setTileNumber(QPoint tileNumber);
+
+private:
+ quint32 m_zoomLevel;
+ QPoint m_tileNumber;
+};
+
+#endif // MAPTILE_H
--- /dev/null
+ /*
+ Situare - A location system for Facebook
+ Copyright (C) 2010 Ixonos Plc. Authors:
+
+ Sami Rämö - sami.ramo@ixonos.com
+
+ Situare 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.
+
+ Situare 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 Situare; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+ USA.
+ */
+
+
+#include "mapview.h"
+
+MapView::MapView(QWidget *parent) : QGraphicsView(parent)
+{
+ setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
+ setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
+}
--- /dev/null
+ /*
+ Situare - A location system for Facebook
+ Copyright (C) 2010 Ixonos Plc. Authors:
+
+ Sami Rämö - sami.ramo@ixonos.com
+
+ Situare 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.
+
+ Situare 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 Situare; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+ USA.
+ */
+
+
+#ifndef MAPVIEW_H
+#define MAPVIEW_H
+
+#include <QGraphicsView>
+
+class MapView : public QGraphicsView
+{
+public:
+ MapView(QWidget *parent = 0);
+};
+
+#endif // MAPVIEW_H
--- /dev/null
+######################################################################
+# Automatically generated by qmake (2.01a) Mon Mar 29 14:23:01 2010
+######################################################################
+
+CONFIG+=qtestlib
+TEMPLATE = app
+TARGET =
+DEPENDPATH += .
+INCLUDEPATH += .
+
+# Input
+HEADERS += ../../../src/ui/mainwindow.h
+SOURCES += testgps.cpp ../../../src/ui/mainwindow.cpp
--- /dev/null
+/*
+ Situare - A location system for Facebook
+ Copyright (C) 2010 Ixonos Plc. Authors:
+
+ Henri Lampela - henri.lampela@ixonos.com
+
+ Situare is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ version 2 as published by the Free Software Foundation.
+
+ Situare 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 Situare; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+ USA.
+ */
+
+#include <QtGui>
+#include <QtTest/QtTest>
+#include "../../../src/ui/mainwindow.h"
+
+class TestGps: public QObject
+{
+ Q_OBJECT
+
+private slots:
+ void testGps();
+
+
+};
+
+void TestGps::testGps()
+{
+ QLineEdit lineEdit;
+
+ QTest::keyClicks(&lineEdit, "UI test");
+
+ QCOMPARE(lineEdit.text(), QString("UI test"));
+}
+
+
+QTEST_MAIN(TestGps)
+#include "testgps.moc"
--- /dev/null
+# #####################################################################
+# Automatically generated by qmake (2.01a) Fri Mar 26 15:09:16 2010
+# #####################################################################
+CONFIG += qtestlib
+TEMPLATE = app
+TARGET =
+DEPENDPATH += .
+INCLUDEPATH += . \
+ ../../../src/
+
+# Input
+SOURCES += testmapengine.cpp \
+ ../../../src/map/mapengine.cpp
+HEADERS += ../../../src/map/mapengine.h
--- /dev/null
+#include <QtTest/QtTest>
+
+#include "map/mapengine.h"
+
+class TestMapEngine: public QObject
+{
+ Q_OBJECT
+private slots:
+ void convertTileNumberToSceneCoordinate();
+};
+
+void TestMapEngine::convertTileNumberToSceneCoordinate()
+{
+ MapEngine mapEngine;
+
+ QCOMPARE(mapEngine.convertTileNumberToSceneCoordinate(18, QPoint(0,0)), QPoint(0,0));
+ QCOMPARE(mapEngine.convertTileNumberToSceneCoordinate(18, QPoint(1,2)), QPoint(256,512));
+ QCOMPARE(mapEngine.convertTileNumberToSceneCoordinate(16, QPoint(3,4)), QPoint(3072,4096));
+}
+
+QTEST_MAIN(TestMapEngine)
+#include "testmapengine.moc"
--- /dev/null
+# #####################################################################
+# Automatically generated by qmake (2.01a) Mon Mar 29 10:06:28 2010
+# #####################################################################
+CONFIG += qtestlib
+TEMPLATE = app
+TARGET =
+DEPENDPATH += .
+INCLUDEPATH += . \
+ ../../../src/
+
+# Input
+SOURCES += testmapscene.cpp \
+ ../../../src/map/mapscene.cpp \
+ ../../../src/map/maptile.cpp
+HEADERS += ../../../src/map/mapscene.h \
+ ../../../src/map/maptile.h
--- /dev/null
+#include <QtTest/QtTest>
+
+#include "map/mapscene.h"
+#include "map/maptile.h"
+
+class TestMapScene : public QObject
+{
+ Q_OBJECT
+private slots:
+ void addMapTile();
+};
+
+void TestMapScene::addMapTile()
+{
+ MapScene mapScene;
+
+ MapTile mapTile;
+ mapTile.setZoomLevel(18);
+ mapTile.setTileNumber(QPoint(12, 47));
+
+ mapScene.addMapTile(&mapTile);
+
+ QVERIFY(mapTile.zoomLevel() == 13);
+}
+
+QTEST_MAIN(TestMapScene)
+#include "testmapscene.moc"
--- /dev/null
+# #####################################################################
+# Automatically generated by qmake (2.01a) Mon Mar 29 10:06:28 2010
+# #####################################################################
+CONFIG += qtestlib
+TEMPLATE = app
+TARGET =
+DEPENDPATH += .
+INCLUDEPATH += . \
+ ../../../src/
+
+# Input
+SOURCES += testmaptile.cpp \
+ ../../../src/map/maptile.cpp
+HEADERS += ../../../src/map/maptile.h
--- /dev/null
+#include <QtTest/QtTest>
+
+#include "map/maptile.h"
+
+class TestMapTile : public QObject
+{
+ Q_OBJECT
+private slots:
+ void zoomLevel();
+ void tileNumber();
+};
+
+void TestMapTile::zoomLevel()
+{
+ MapTile mapTile;
+ mapTile.setZoomLevel(13);
+ QVERIFY(mapTile.zoomLevel() == 13);
+}
+
+void TestMapTile::tileNumber()
+{
+ MapTile mapTile;
+ mapTile.setTileNumber(QPoint(24, 17));
+ QVERIFY(mapTile.tileNumber() == QPoint(24, 17));
+}
+
+QTEST_MAIN(TestMapTile)
+#include "testmaptile.moc"
--- /dev/null
+# #####################################################################
+# Automatically generated by qmake (2.01a) Fri Mar 26 15:22:56 2010
+# #####################################################################
+CONFIG += qtestlib
+TEMPLATE = app
+TARGET =
+DEPENDPATH += .
+INCLUDEPATH += . \
+ ../../../src/
+
+# Input
+SOURCES += testmapview.cpp \
+ ../../../src/map/mapview.cpp
+HEADERS += ../../../src/map/mapview.h
--- /dev/null
+#include <QtTest/QtTest>
+
+#include "map/mapview.h"
+
+class TestMapView: public QObject
+{
+ Q_OBJECT
+private slots:
+ void dummyTestCase();
+};
+
+void TestMapView::dummyTestCase()
+{
+ QVERIFY(true);
+}
+
+QTEST_MAIN(TestMapView)
+#include "testmapview.moc"
--- /dev/null
+######################################################################
+# Automatically generated by qmake (2.01a) Mon Mar 29 14:23:19 2010
+######################################################################
+
+CONFIG+=qtestlib
+TEMPLATE = app
+TARGET =
+DEPENDPATH += .
+INCLUDEPATH += .
+
+# Input
+HEADERS += ../../../src/ui/mainwindow.h
+SOURCES += testphp.cpp ../../../src/ui/mainwindow.cpp
--- /dev/null
+/*
+ Situare - A location system for Facebook
+ Copyright (C) 2010 Ixonos Plc. Authors:
+
+ Henri Lampela - henri.lampela@ixonos.com
+
+ Situare is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ version 2 as published by the Free Software Foundation.
+
+ Situare 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 Situare; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+ USA.
+ */
+
+#include <QtGui>
+#include <QtTest/QtTest>
+#include "../../../src/ui/mainwindow.h"
+
+class TestPhp: public QObject
+{
+ Q_OBJECT
+
+private slots:
+ void testPhp();
+
+
+};
+
+void TestPhp::testPhp()
+{
+ QLineEdit lineEdit;
+
+ QTest::keyClicks(&lineEdit, "UI test");
+
+ QCOMPARE(lineEdit.text(), QString("UI test"));
+}
+
+
+QTEST_MAIN(TestPhp)
+#include "testphp.moc"
+++ /dev/null
-######################################################################
-# Automatically generated by qmake (2.01a) Fri Mar 26 11:22:18 2010
-######################################################################
-
-CONFIG += qtestlib
-TEMPLATE = app
-TARGET =
-DEPENDPATH += .
-INCLUDEPATH += .
-
-# Input
-HEADERS += ../../src/ui/mainwindow.h testui.moc
-SOURCES += testui.cpp ../../src/ui/mainwindow.cpp
--- /dev/null
+######################################################################
+# Automatically generated by qmake (2.01a) Mon Mar 29 14:23:24 2010
+######################################################################
+
+CONFIG+=qtestlib
+TEMPLATE = app
+TARGET =
+DEPENDPATH += .
+INCLUDEPATH += .
+
+# Input
+HEADERS += ../../../src/ui/mainwindow.h
+SOURCES += testui.cpp ../../../src/ui/mainwindow.cpp
--- /dev/null
+/*
+ Situare - A location system for Facebook
+ Copyright (C) 2010 Ixonos Plc. Authors:
+
+ Henri Lampela - henri.lampela@ixonos.com
+
+ Situare is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ version 2 as published by the Free Software Foundation.
+
+ Situare 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 Situare; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+ USA.
+ */
+
+#include <QtGui>
+#include <QtTest/QtTest>
+#include "../../../src/ui/mainwindow.h"
+
+class TestUi: public QObject
+{
+ Q_OBJECT
+
+private slots:
+ void testUi();
+
+
+};
+
+void TestUi::testUi()
+{
+ QLineEdit lineEdit;
+
+ QTest::keyClicks(&lineEdit, "UI tests");
+
+ QCOMPARE(lineEdit.text(), QString("UI test"));
+}
+
+
+QTEST_MAIN(TestUi)
+#include "testui.moc"
+++ /dev/null
-/*
- Situare - A location system for Facebook
- Copyright (C) 2010 Ixonos Plc. Authors:
-
- Henri Lampela - henri.lampela@ixonos.com
-
- Situare is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License
- version 2 as published by the Free Software Foundation.
-
- Situare 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 Situare; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
- USA.
- */
-
-#include <QtGui>
-#include <QtTest/QtTest>
-#include "../../src/ui/mainwindow.h"
-
-class TestUi: public QObject
-{
- Q_OBJECT
-
-private slots:
- void testUi();
-
-
-};
-
-void TestUi::testUi()
-{
- QLineEdit lineEdit;
-
- QTest::keyClicks(&lineEdit, "UI test");
-
- QCOMPARE(lineEdit.text(), QString("UI test"));
-}
-
-
-QTEST_MAIN(TestUi)
-#include "testui.moc"