From 2ca532122d60cff4dbdc7f24fbc5783bcc5ad68d Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Tue, 12 Apr 2016 20:06:47 +0200 Subject: Soil Moisture: Adding support for controlling lights. Bluetooth: refectorying, trying to be more c++ idiomatic and modern. SM/Diller: adding bluetooth to Diller bridge. --- sensor/test/SampleTest.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'sensor/test') 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); } -- cgit v1.2.3