aboutsummaryrefslogtreecommitdiffstats
path: root/host/tests
diff options
context:
space:
mode:
authorBrent Stapleton <brent.stapleton@ettus.com>2018-05-04 16:45:08 -0700
committerMartin Braun <martin.braun@ettus.com>2018-05-14 18:02:45 -0700
commit388ebd00f618e75941c3f2045f448c10e514dcd4 (patch)
treee90fdeabf9ac450d2476cef031287429e6745ecc /host/tests
parente942181f600b6b35f2200244b9899e23b20cf6cf (diff)
downloaduhd-388ebd00f618e75941c3f2045f448c10e514dcd4.tar.gz
uhd-388ebd00f618e75941c3f2045f448c10e514dcd4.tar.bz2
uhd-388ebd00f618e75941c3f2045f448c10e514dcd4.zip
types: convert sensor_value_t to a map
Diffstat (limited to 'host/tests')
-rw-r--r--host/tests/sensors_test.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/host/tests/sensors_test.cpp b/host/tests/sensors_test.cpp
index e15269e2d..2136ca13b 100644
--- a/host/tests/sensors_test.cpp
+++ b/host/tests/sensors_test.cpp
@@ -91,5 +91,12 @@ BOOST_AUTO_TEST_CASE(test_sensor_string) {
auto sensor_str2 = sensor_value_t(sensor_map);
BOOST_CHECK_EQUAL(sensor_str2.unit, sens_units);
+
+ sensor_value_t sensor_str3(sensor_str2.to_map());
+ BOOST_CHECK_EQUAL(sensor_str2.name, sensor_str3.name);
+ BOOST_CHECK_EQUAL(sensor_str2.value, sensor_str3.value);
+ BOOST_CHECK_EQUAL(sensor_str2.unit, sensor_str3.unit);
+ BOOST_CHECK_EQUAL(sensor_str2.type, sensor_str3.type);
+
}