diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2016-04-12 20:06:47 +0200 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2016-04-12 20:06:47 +0200 |
commit | 2ca532122d60cff4dbdc7f24fbc5783bcc5ad68d (patch) | |
tree | 19f9ce796886e216a608fa5e938bd2bd4f0d0b55 /sensor/test | |
parent | ce07550c57172443c10a66957b50085e273d20b3 (diff) | |
download | ble-toys-2ca532122d60cff4dbdc7f24fbc5783bcc5ad68d.tar.gz ble-toys-2ca532122d60cff4dbdc7f24fbc5783bcc5ad68d.tar.bz2 ble-toys-2ca532122d60cff4dbdc7f24fbc5783bcc5ad68d.tar.xz ble-toys-2ca532122d60cff4dbdc7f24fbc5783bcc5ad68d.zip |
Soil Moisture: Adding support for controlling lights.
Bluetooth: refectorying, trying to be more c++ idiomatic and modern.
SM/Diller: adding bluetooth to Diller bridge.
Diffstat (limited to 'sensor/test')
-rw-r--r-- | sensor/test/SampleTest.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sensor/test/SampleTest.cpp b/sensor/test/SampleTest.cpp index 8479e75..0fffc04 100644 --- a/sensor/test/SampleTest.cpp +++ b/sensor/test/SampleTest.cpp @@ -49,13 +49,13 @@ BOOST_AUTO_TEST_CASE(key_value_parser2) { SampleRecord& sample = buffer->samples[0]; auto it = dict.begin(); BOOST_CHECK_EQUAL((*it)->name, "now"); - BOOST_CHECK_EQUAL(!sample.at(*it).operator!(), true); - BOOST_CHECK_EQUAL(sample.at(*it).get(), "1"); + BOOST_CHECK_EQUAL(!!sample.at(*it), true); + BOOST_CHECK_EQUAL(sample.at(*it).value(), "1"); BOOST_CHECK_EQUAL((*it++)->index, 0); BOOST_CHECK_EQUAL((*it)->name, "sensor 1"); - BOOST_CHECK_EQUAL(!sample.at(*it).operator!(), true); - BOOST_CHECK_EQUAL(sample.at(*it).get(), "0.000999999833333"); + BOOST_CHECK_EQUAL(!!sample.at(*it), true); + BOOST_CHECK_EQUAL(sample.at(*it).value(), "0.000999999833333"); BOOST_CHECK_EQUAL((*it++)->index, 1); } @@ -112,12 +112,12 @@ BOOST_AUTO_TEST_CASE(key_value_parser_without_newline) { SampleRecord& sample = buffer->samples[0]; auto it = dict.begin(); BOOST_CHECK_EQUAL((*it)->name, "now"); - BOOST_CHECK_EQUAL(!sample.at(*it).operator!(), true); - BOOST_CHECK_EQUAL(sample.at(*it).get(), "1"); + BOOST_CHECK_EQUAL(!!sample.at(*it), true); + BOOST_CHECK_EQUAL(sample.at(*it).value(), "1"); BOOST_CHECK_EQUAL((*it++)->index, 0); BOOST_CHECK_EQUAL((*it)->name, "sensor"); - BOOST_CHECK_EQUAL(!sample.at(*it).operator!(), true); - BOOST_CHECK_EQUAL(sample.at(*it).get(), "123"); + BOOST_CHECK_EQUAL(!!sample.at(*it), true); + BOOST_CHECK_EQUAL(sample.at(*it).value(), "123"); BOOST_CHECK_EQUAL((*it++)->index, 1); } |