From 19714b30f9dff135f4b831895ce2ac518554e2c6 Mon Sep 17 00:00:00 2001 From: Alex Blasche Date: Tue, 17 Jun 2014 16:55:08 +0200 Subject: Push improved API. QLowEnergyService represents each single service on the remote BTLE device. QLowEnergyControllerNew acts as factory for QLowEnergyService instances. Change-Id: I07c6bfae6d14b73a80e8314f6e8471285fccf069 Reviewed-by: Fabian Bumberger --- tests/auto/qlowenergycontroller/tst_qlowenergycontroller.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/auto/qlowenergycontroller/tst_qlowenergycontroller.cpp b/tests/auto/qlowenergycontroller/tst_qlowenergycontroller.cpp index 2c26ffe8..e0328c56 100644 --- a/tests/auto/qlowenergycontroller/tst_qlowenergycontroller.cpp +++ b/tests/auto/qlowenergycontroller/tst_qlowenergycontroller.cpp @@ -811,8 +811,12 @@ void tst_QLowEnergyController::tst_connectNew() info.serviceUuid().toString().toLatin1()); } - foreach (const QBluetoothUuid &uuid, control.services()) + foreach (const QSharedPointer &entry, control.services()) { + const QBluetoothUuid &uuid = entry.data()->serviceUuid(); QVERIFY2(listing.contains(uuid), uuid.toString().toLatin1()); + QCOMPARE(entry.data()->type(), QLowEnergyService::PrimaryService); + QCOMPARE(entry.data()->state(), QLowEnergyService::DiscoveryRequired); + } // Finish off control.disconnectFromDevice(); -- cgit v1.2.3