summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qgeoaddress/tst_qgeoaddress.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/auto/qgeoaddress/tst_qgeoaddress.cpp b/tests/auto/qgeoaddress/tst_qgeoaddress.cpp
index 8f52fae2..85abd079 100644
--- a/tests/auto/qgeoaddress/tst_qgeoaddress.cpp
+++ b/tests/auto/qgeoaddress/tst_qgeoaddress.cpp
@@ -55,6 +55,7 @@ public:
private Q_SLOTS:
void constructorTest();
+ void formattedAddress();
//TODO: there are various field we don't have yet in QGeoAddress
// will need to either remove or enable these tests
// void additionalDataTest();
@@ -90,6 +91,14 @@ void tst_QGeoAddress::constructorTest()
delete testObjPtr;
}
+void tst_QGeoAddress::formattedAddress()
+{
+ QGeoAddress address;
+ QVERIFY(address.formattedAddress().isEmpty());
+ address.setFormattedAddress(QLatin1String("123 Fake Street\nSpringfield"));
+ QCOMPARE(address.formattedAddress(), QLatin1String("123 Fake Street\nSpringfield"));
+}
+
void tst_QGeoAddress::cityTest()
{
QGeoAddress testObj;
@@ -238,6 +247,10 @@ void tst_QGeoAddress::emptyClearTest()
QVERIFY(!testObj.isEmpty());
testObj.clear();
+ testObj.setFormattedAddress(QLatin1String("formatted address"));
+ QVERIFY(!testObj.isEmpty());
+ testObj.clear();
+
QVERIFY(testObj.isEmpty());
}