Fixed unit tests
authorSami Rämö <sami.ramo@ixonos.com>
Mon, 21 Jun 2010 07:17:00 +0000 (10:17 +0300)
committerSami Rämö <sami.ramo@ixonos.com>
Mon, 21 Jun 2010 07:17:00 +0000 (10:17 +0300)
 - Removed unnecessary includes

 - Added missing MapScroller includes

tests/map/friendgroupitem/friendgroupitem.pro
tests/map/friendlocationitem/friendlocationitem.pro
tests/map/friendlocationitem/testfriendlocationitem.cpp
tests/map/mapengine/mapengine.pro
tests/map/mapscene/mapscene.pro
tests/map/maptile/maptile.pro
tests/map/mapview/mapview.pro
tests/map/ownlocationitem/ownlocationitem.pro
tests/map/ownlocationitem/testownlocationitem.cpp

index eb2060c..1abdcc2 100644 (file)
@@ -25,7 +25,8 @@ SOURCES += testfriendgroupitem.cpp \
     ../../../src/map/gpslocationitem.cpp \
     ../../../src/network/networkaccessmanager.cpp \
     ../../../src/network/networkhandler.cpp \
-    ../../../src/network/networkreply.cpp
+    ../../../src/network/networkreply.cpp \
+    ../../../src/map/mapscroller.cpp
 HEADERS += ../../../src/map/friendgroupitem.h \
     ../../../src/map/friendlocationitem.h \
     ../../../src/map/baselocationitem.h \
@@ -41,7 +42,8 @@ HEADERS += ../../../src/map/friendgroupitem.h \
     ../../../src/map/gpslocationitem.h \
     ../../../src/network/networkaccessmanager.h \
     ../../../src/network/networkhandler.h \
-    ../../../src/network/networkreply.h
+    ../../../src/network/networkreply.h \
+    ../../../src/map/mapscroller.h
 DEFINES += QT_NO_DEBUG_OUTPUT
 RESOURCES += ../../../images.qrc
 
index 45dba5e..6bca988 100644 (file)
@@ -12,62 +12,10 @@ RESOURCES += ../../../images.qrc
 
 # Input
 SOURCES += testfriendlocationitem.cpp \
-    ../../../src/map/mapscene.cpp \
-    ../../../src/map/maptile.cpp \
-    ../../../src/map/mapengine.cpp \
-    ../../../src/map/mapfetcher.cpp \
-    ../../../src/map/ownlocationitem.cpp \
-    ../../../src/map/mapview.cpp \
     ../../../src/map/baselocationitem.cpp \
-    ../../../src/user/user.cpp \
-    ../../../src/map/friendlocationitem.cpp \
-    ../../../src/map/maptilerequest.cpp \
-    ../../../src/map/frienditemshandler.cpp \
-    ../../../src/map/friendgroupitem.cpp \
-    ../../../src/map/gpslocationitem.cpp \
-    ../../../src/network/networkaccessmanager.cpp \
-    ../../../src/network/networkhandler.cpp \
-    ../../../src/network/networkreply.cpp
-HEADERS += ../../../src/map/ownlocationitem.h \
-    ../../../src/map/mapscene.h \
-    ../../../src/map/maptile.h \
-    ../../../src/map/mapengine.h \
-    ../../../src/map/mapfetcher.h \
-    ../../../src/map/mapcommon.h \
-    ../../../src/map/mapview.h \
+    ../../../src/map/friendlocationitem.cpp
+HEADERS += ../../../src/map/mapcommon.h \
     ../../../src/map/baselocationitem.h \
-    ../../../src/user/user.h \
-    ../../../src/map/friendlocationitem.h \
-    ../../../src/map/maptilerequest.h \
-    ../../../src/map/frienditemshandler.h \
-    ../../../src/map/friendgroupitem.h \
-    ../../../src/map/gpslocationitem.h \
-    ../../../src/network/networkaccessmanager.h \
-    ../../../src/network/networkhandler.h \
-    ../../../src/network/networkreply.h
+    ../../../src/map/friendlocationitem.h
 
 DEFINES += QT_NO_DEBUG_OUTPUT
-
-maemo5 | simulator {
-    INCLUDEPATH += /usr/include/glib-2.0 /usr/lib/glib-2.0/include
-    SOURCES += ../../../src/network/networkhandlerprivate.cpp
-    HEADERS += ../../../src/network/networkhandlerprivate.h
-    QT += maemo5 dbus
-    CONFIG += icd2
-    message([QJson])
-    message(Make sure you have QJson development headers installed)
-    message(add: deb http://repository.maemo.org/extras-devel fremantle free non-free)
-    message(to Scratchbox's sources.list in /etc/apt)
-    message(run: apt-get update)
-    message(install headers with: apt-get install libqjson-dev)
-    message([QtMobility])
-    message(Make sure you have QtMobility development headers installed)
-    message(install headers with: apt-get install libqtm-dev)
-} else {
-    SOURCES += ../../../src/network/networkhandlerprivatestub.cpp
-    HEADERS += ../../../src/network/networkhandlerprivatestub.h
-    message(QJson built in)
-    message(Make sure you have QJson development headers installed)
-    message(install headers with: sudo apt-get install libqjson-dev)
-}
-
index c119afe..444d98b 100644 (file)
     USA.
 */
 
-#include <QtGui>
 #include <QtTest/QtTest>
-#include <QDebug>
-#include <QList>
 
-#include "map/friendlocationitem.h"
-#include "map/mapscene.h"
-#include "map/maptile.h"
-#include "map/mapengine.h"
-#include "map/mapcommon.h"
-#include "map/mapview.h"
 #include "map/baselocationitem.h"
-#include "user/user.h"
 #include "map/friendlocationitem.h"
+#include "map/mapcommon.h"
 
 namespace Testfriendlocation  //  Test data for function is defined in namespace
 {
     const QPointF defaultPosition(UNDEFINED, UNDEFINED);
     const QString userID("ABC123");
     const QUrl url("http://www.test.com/test.png");
-    const int itemIgnoresTransformationsFlagValue = 0x20;  
+    const int itemIgnoresTransformationsFlagValue = 0x20;
 }
 
 using namespace Testfriendlocation;
index 380f4bd..860cc0b 100644 (file)
@@ -26,7 +26,8 @@ SOURCES += testmapengine.cpp \
     ../../../src/map/gpslocationitem.cpp \
     ../../../src/network/networkaccessmanager.cpp \
     ../../../src/network/networkhandler.cpp \
-    ../../../src/network/networkreply.cpp
+    ../../../src/network/networkreply.cpp \
+    ../../../src/map/mapscroller.cpp
 HEADERS += ../../../src/map/mapengine.h \
     ../../../src/map/mapscene.h \
     ../../../src/map/maptile.h \
@@ -43,7 +44,8 @@ HEADERS += ../../../src/map/mapengine.h \
     ../../../src/map/gpslocationitem.h \
     ../../../src/network/networkaccessmanager.h \
     ../../../src/network/networkhandler.h \
-    ../../../src/network/networkreply.h
+    ../../../src/network/networkreply.h \
+    ../../../src/map/mapscroller.h
 DEFINES += QT_NO_DEBUG_OUTPUT
 
 maemo5 | simulator {
@@ -68,4 +70,3 @@ maemo5 | simulator {
     message(Make sure you have QJson development headers installed)
     message(install headers with: sudo apt-get install libqjson-dev)
 }
-
index 92fa786..41325d5 100644 (file)
@@ -25,7 +25,8 @@ SOURCES += testmapscene.cpp \
     ../../../src/map/gpslocationitem.cpp \
     ../../../src/network/networkaccessmanager.cpp \
     ../../../src/network/networkhandler.cpp \
-    ../../../src/network/networkreply.cpp
+    ../../../src/network/networkreply.cpp \
+    ../../../src/map/mapscroller.cpp
 HEADERS += ../../../src/map/mapscene.h \
     ../../../src/map/maptile.h \
     ../../../src/map/mapengine.h \
@@ -40,7 +41,8 @@ HEADERS += ../../../src/map/mapscene.h \
     ../../../src/map/gpslocationitem.h \
     ../../../src/network/networkaccessmanager.h \
     ../../../src/network/networkhandler.h \
-    ../../../src/network/networkreply.h
+    ../../../src/network/networkreply.h \
+    ../../../src/map/mapscroller.h
 DEFINES += QT_NO_DEBUG_OUTPUT
 
 maemo5 | simulator {
index 9bc4918..35d23ee 100644 (file)
@@ -26,7 +26,8 @@ SOURCES += testmaptile.cpp \
     ../../../src/map/gpslocationitem.cpp \
     ../../../src/network/networkaccessmanager.cpp \
     ../../../src/network/networkhandler.cpp \
-    ../../../src/network/networkreply.cpp
+    ../../../src/network/networkreply.cpp \
+    ../../../src/map/mapscroller.cpp
 HEADERS += ../../../src/map/maptile.h \
     ../../../src/map/mapfetcher.h \
     ../../../src/map/mapengine.h \
@@ -41,7 +42,8 @@ HEADERS += ../../../src/map/maptile.h \
     ../../../src/map/gpslocationitem.h \
     ../../../src/network/networkaccessmanager.h \
     ../../../src/network/networkhandler.h \
-    ../../../src/network/networkreply.h
+    ../../../src/network/networkreply.h \
+    ../../../src/map/mapscroller.h
 DEFINES += QT_NO_DEBUG_OUTPUT
 
 maemo5 | simulator {
index 1a869da..5a5a74a 100644 (file)
@@ -10,7 +10,9 @@ INCLUDEPATH += . \
 
 # Input
 SOURCES += testmapview.cpp \
-    ../../../src/map/mapview.cpp
-HEADERS += ../../../src/map/mapview.h
+    ../../../src/map/mapview.cpp \
+    ../../../src/map/mapscroller.cpp
+HEADERS += ../../../src/map/mapview.h \
+    ../../../src/map/mapscroller.h
 
 DEFINES += QT_NO_DEBUG_OUTPUT
index a2292f6..d50ba85 100644 (file)
@@ -12,60 +12,8 @@ RESOURCES += ../../../images.qrc
 
 # Input
 SOURCES += testownlocationitem.cpp \
-    ../../../src/map/mapscene.cpp \
-    ../../../src/map/maptile.cpp \
-    ../../../src/map/mapengine.cpp \
-    ../../../src/map/mapfetcher.cpp \
     ../../../src/map/ownlocationitem.cpp \
-    ../../../src/map/mapview.cpp \
-    ../../../src/map/baselocationitem.cpp \
-    ../../../src/user/user.cpp \
-    ../../../src/map/friendlocationitem.cpp \
-    ../../../src/map/maptilerequest.cpp \
-    ../../../src/map/frienditemshandler.cpp \
-    ../../../src/map/friendgroupitem.cpp \
-    ../../../src/map/gpslocationitem.cpp \
-    ../../../src/network/networkaccessmanager.cpp \
-    ../../../src/network/networkhandler.cpp \
-    ../../../src/network/networkreply.cpp
+    ../../../src/map/baselocationitem.cpp
 HEADERS += ../../../src/map/ownlocationitem.h \
-    ../../../src/map/mapscene.h \
-    ../../../src/map/maptile.h \
-    ../../../src/map/mapengine.h \
-    ../../../src/map/mapfetcher.h \
-    ../../../src/map/mapcommon.h \
-    ../../../src/map/mapview.h \
-    ../../../src/map/baselocationitem.h \
-    ../../../src/user/user.h \
-    ../../../src/map/friendlocationitem.h \
-    ../../../src/map/maptilerequest.h \
-    ../../../src/map/frienditemshandler.h \
-    ../../../src/map/friendgroupitem.h \
-    ../../../src/map/gpslocationitem.h \
-    ../../../src/network/networkaccessmanager.h \
-    ../../../src/network/networkhandler.h \
-    ../../../src/network/networkreply.h
+    ../../../src/map/baselocationitem.h
 DEFINES += QT_NO_DEBUG_OUTPUT
-
-maemo5 | simulator {
-    INCLUDEPATH += /usr/include/glib-2.0 /usr/lib/glib-2.0/include
-    SOURCES += ../../../src/network/networkhandlerprivate.cpp
-    HEADERS += ../../../src/network/networkhandlerprivate.h
-    QT += maemo5 dbus
-    CONFIG += icd2
-    message([QJson])
-    message(Make sure you have QJson development headers installed)
-    message(add: deb http://repository.maemo.org/extras-devel fremantle free non-free)
-    message(to Scratchbox's sources.list in /etc/apt)
-    message(run: apt-get update)
-    message(install headers with: apt-get install libqjson-dev)
-    message([QtMobility])
-    message(Make sure you have QtMobility development headers installed)
-    message(install headers with: apt-get install libqtm-dev)
-} else {
-    SOURCES += ../../../src/network/networkhandlerprivatestub.cpp
-    HEADERS += ../../../src/network/networkhandlerprivatestub.h
-    message(QJson built in)
-    message(Make sure you have QJson development headers installed)
-    message(install headers with: sudo apt-get install libqjson-dev)
-}
index 3b5ad7d..137d883 100644 (file)
 #include <QList>
 
 #include "map/ownlocationitem.h"
-#include "map/mapscene.h"
-#include "map/maptile.h"
-#include "map/mapengine.h"
-#include "map/mapcommon.h"
-#include "map/mapview.h"
-#include "map/baselocationitem.h"
-#include "user/user.h"
-#include "map/friendlocationitem.h"
 
 namespace TestOwnLocation  //  Test data for function is defined in namespace
 {