diff options
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/auto.pro | 1 | ||||
-rw-r--r-- | tests/auto/qgeoplace/tst_qgeoplace.cpp | 15 | ||||
-rw-r--r-- | tests/auto/qplacecontact/qplacecontact.pro | 7 | ||||
-rw-r--r-- | tests/auto/qplacecontact/tst_qplacecontact.cpp | 75 |
4 files changed, 0 insertions, 98 deletions
diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro index 40d7ae9a..ab7cdd37 100644 --- a/tests/auto/auto.pro +++ b/tests/auto/auto.pro @@ -18,7 +18,6 @@ SUBDIRS += geotestplugin \ qgeosearchmanager \ qplacebusinessfeature \ qplacecategory \ - qplacecontact \ qplacedescription \ qplacemediaobject \ qplaceperiod \ diff --git a/tests/auto/qgeoplace/tst_qgeoplace.cpp b/tests/auto/qgeoplace/tst_qgeoplace.cpp index 3b4e2007..b39f3056 100644 --- a/tests/auto/qgeoplace/tst_qgeoplace.cpp +++ b/tests/auto/qgeoplace/tst_qgeoplace.cpp @@ -17,7 +17,6 @@ private Q_SLOTS: void additionalDataTest(); void businessInformationTest(); void categoriesTest(); - void contactsTest(); void descriptionsTest(); void detailsFetchedTest(); void locationTest(); @@ -204,20 +203,6 @@ void tst_QGeoPlace::reviewsTest() QVERIFY2(testObj.reviews().stop() == 1, "Wrong value returned"); } -void tst_QGeoPlace::contactsTest() -{ - QGeoPlace testObj; - QVERIFY2(testObj.contacts().count() == 0, "Wrong default value"); - QPlaceContact sup; - sup.setDescription("testId"); - QList<QPlaceContact> list; - list.append(sup); - sup.setDescription("testName2"); - list.append(sup); - testObj.setContacts(list); - QVERIFY2(testObj.contacts().count() == 2, "Wrong value returned"); -} - void tst_QGeoPlace::categoriesTest() { QGeoPlace testObj; diff --git a/tests/auto/qplacecontact/qplacecontact.pro b/tests/auto/qplacecontact/qplacecontact.pro deleted file mode 100644 index 3bf7ce71..00000000 --- a/tests/auto/qplacecontact/qplacecontact.pro +++ /dev/null @@ -1,7 +0,0 @@ -TEMPLATE = app -CONFIG += testcase -TARGET = tst_qplacecontact - -SOURCES += tst_qplacecontact.cpp - -QT += location testlib diff --git a/tests/auto/qplacecontact/tst_qplacecontact.cpp b/tests/auto/qplacecontact/tst_qplacecontact.cpp deleted file mode 100644 index dfdc28e0..00000000 --- a/tests/auto/qplacecontact/tst_qplacecontact.cpp +++ /dev/null @@ -1,75 +0,0 @@ -#include <QtCore/QString> -#include <QtTest/QtTest> - -#include <qplacecontact.h> - -QT_USE_NAMESPACE - -class tst_QPlaceContact : public QObject -{ - Q_OBJECT - -public: - tst_QPlaceContact(); - -private Q_SLOTS: - void constructorTest(); - void descriptionTest(); - void typeTest(); - void valueTest(); - void operatorsTest(); -}; - -tst_QPlaceContact::tst_QPlaceContact() -{ -} - -void tst_QPlaceContact::constructorTest() -{ - QPlaceContact testObj; - Q_UNUSED(testObj); - - QPlaceContact *testObjPtr = new QPlaceContact(testObj); - QVERIFY2(testObjPtr != NULL, "Copy constructor - null"); - QVERIFY2(*testObjPtr == testObj, "Copy constructor - compare"); - delete testObjPtr; -} - -void tst_QPlaceContact::descriptionTest() -{ - QPlaceContact testObj; - QVERIFY2(testObj.description() == QString(), "Wrong default value"); - testObj.setDescription("testText"); - QVERIFY2(testObj.description() == "testText", "Wrong value returned"); -} - -void tst_QPlaceContact::typeTest() -{ - QPlaceContact testObj; - QVERIFY2(testObj.type() == QPlaceContact::Undefined, "Wrong default value"); - testObj.setType(QPlaceContact::Fax); - QVERIFY2(testObj.type() == QPlaceContact::Fax, "Wrong value returned"); -} - -void tst_QPlaceContact::valueTest() -{ - QPlaceContact testObj; - QVERIFY2(testObj.value() == QString(), "Wrong default value"); - testObj.setValue("testText"); - QVERIFY2(testObj.value() == "testText", "Wrong value returned"); -} - -void tst_QPlaceContact::operatorsTest() -{ - QPlaceContact testObj; - testObj.setDescription("testValue"); - QPlaceContact testObj2; - testObj2 = testObj; - QVERIFY2(testObj == testObj2, "Not copied correctly"); - testObj2.setValue("testValue2"); - QVERIFY2(testObj != testObj2, "Object should be different"); -} - -QTEST_APPLESS_MAIN(tst_QPlaceContact); - -#include "tst_qplacecontact.moc" |