diff --git a/test/functional-tests/BitParameter.cpp b/test/functional-tests/BitParameter.cpp
index 8c9d71a55..0a0fb9508 100644
--- a/test/functional-tests/BitParameter.cpp
+++ b/test/functional-tests/BitParameter.cpp
@@ -45,7 +45,7 @@ namespace parameterFramework
const auto validBitParameterInstances = Config{
&Config::instances,
// Default for integers is unsigned/32bits
- R"()"};
+ R"()"};
const auto &invalidBitParameterParameters =
Tests{{"Too much bits", "{
+ {"(upper limit)", true}, {"(lower limit)", false},
+ }) {
+ GIVEN ("Invalid value " + vec.title) {
+ CHECK_THROWS_AS(handle.setAsBoolean(vec.payload), Exception);
+ }
+ }
+ }
+
+ AND_THEN ("Set/Get a BitParameter type parameter in boolean") {
+ path = "/test/test/nominal/bool";
+ ElementHandle handle{*this, path};
+ /** @FIXME: 'set' operations on a ParameterHandle are silently
+ * ignored in tuning mode. Does it make sense ? */
+ REQUIRE_NOTHROW(setTuningMode(false));
+
+ for (auto &vec : Tests{
+ {"(upper limit)", true}, {"(lower limit)", false},
+ }) {
+ GIVEN ("A valid value " + vec.title) {
+ CHECK_NOTHROW(handle.setAsBoolean(vec.payload));
+ bool getValueBack;
+ REQUIRE_NOTHROW(handle.getAsBoolean(getValueBack));
+ CHECK(getValueBack == vec.payload);
+ }
+ }
+ }
}
}
}