diff options
author | Alex Blasche <alexander.blasche@theqtcompany.com> | 2014-11-25 10:46:37 +0100 |
---|---|---|
committer | Alex Blasche <alexander.blasche@theqtcompany.com> | 2014-11-26 14:52:24 +0100 |
commit | 0e3046f29b0e86affeb33c8f6687618cfd1dfae2 (patch) | |
tree | 418db3d38304a8431dc2205c2e6e6cd2c5a0866c /tests/auto/qlowenergycontroller/tst_qlowenergycontroller.cpp | |
parent | be750788c7f5276b0a8686e1f11bf4ca12ee9231 (diff) |
Fix missing update of cached characteristic value
When we receive a characteristic update we have to update the cached
value on the Qt side. This was accidentally missed during an earlier
commit.
Change-Id: I0f84e35ee44e38d1e46b7ddcd4e78b7e216e49d5
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Diffstat (limited to 'tests/auto/qlowenergycontroller/tst_qlowenergycontroller.cpp')
-rw-r--r-- | tests/auto/qlowenergycontroller/tst_qlowenergycontroller.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/auto/qlowenergycontroller/tst_qlowenergycontroller.cpp b/tests/auto/qlowenergycontroller/tst_qlowenergycontroller.cpp index a91f8096..67ae1872 100644 --- a/tests/auto/qlowenergycontroller/tst_qlowenergycontroller.cpp +++ b/tests/auto/qlowenergycontroller/tst_qlowenergycontroller.cpp @@ -1858,6 +1858,13 @@ void tst_QLowEnergyController::tst_writeDescriptor() const QLowEnergyCharacteristic ch = entry[0].value<QLowEnergyCharacteristic>(); QCOMPARE(tempData, ch); + + //check last characteristic changed value matches the characteristics current value + if (i == (charChangedSpy.count() - 1)) { + writtenValue = entry[1].toByteArray(); + QCOMPARE(ch.value(), writtenValue); + QCOMPARE(tempData.value(), writtenValue); + } } service->writeCharacteristic(tempConfig, QByteArray::fromHex("00")); |