aboutsummaryrefslogtreecommitdiffstats
path: root/host/tests/sensors_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'host/tests/sensors_test.cpp')
-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);
+
}