summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@theqtcompany.com>2016-02-10 11:07:05 +0100
committerAlex Blasche <alexander.blasche@theqtcompany.com>2016-02-11 06:42:22 +0000
commit40a91836221740cf9391ccfd36b92c368db59a8f (patch)
tree9e144c2647ee69844d76f79335bd0551ff64647a /tests
parent02ebea91bcf0e212b3226a761a491625f671e73b (diff)
Fix undefined behavior in AddressInfo's default ctor.
The AddressInfo::type member was not properly initialised. Change-Id: I79c8e1d00d4cb03e3d073a23bb4dbf6b9d510b7c Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qlowenergycontroller-gattserver/test/tst_qlowenergycontroller-gattserver.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/auto/qlowenergycontroller-gattserver/test/tst_qlowenergycontroller-gattserver.cpp b/tests/auto/qlowenergycontroller-gattserver/test/tst_qlowenergycontroller-gattserver.cpp
index 8b11e5a7..f487db00 100644
--- a/tests/auto/qlowenergycontroller-gattserver/test/tst_qlowenergycontroller-gattserver.cpp
+++ b/tests/auto/qlowenergycontroller-gattserver/test/tst_qlowenergycontroller-gattserver.cpp
@@ -114,6 +114,11 @@ void TestQLowEnergyControllerGattServer::advertisingParameters()
QCOMPARE(params.whiteList(), whiteList);
QCOMPARE(params.filterPolicy(), QLowEnergyAdvertisingParameters::UseWhiteListForConnecting);
QVERIFY(params != QLowEnergyAdvertisingParameters());
+
+ // verify default ctor
+ QLowEnergyAdvertisingParameters::AddressInfo info;
+ QVERIFY(info.address == QBluetoothAddress());
+ QVERIFY(info.type == QLowEnergyController::PublicAddress);
}
void TestQLowEnergyControllerGattServer::advertisingData()