path: root/src/test
diff options
authorMatt Spinler <>2018-02-19 13:34:43 -0600
committerMatt Spinler <>2018-02-23 13:51:48 -0600
commitabe43ab439bba463f4727a98ed0cc0c6a5e8251f (patch)
tree84416bf5d4d38ce4d7ced993596e5b661e3e38da /src/test
parentc458deea83b4356f07194691e301037d8e831d46 (diff)
Extend storage array to contain additional data
This array was originally just an array of objects of type 'any'. This commit changes it to be an array of tuples of type <any, any> to add an extra field for use by anything that needs it. For example, the storage is currently used to store property values, and a future change to the CountCondition class will now also store the result of the comparisons done between the property values and another value specified in the rule YAML. Then, a callback will be able to see the result of whether each property passed the check. Tested: Build and run unit tests Change-Id: I58f32c9f4068b15a02b1ff7f28871161cafebddb Signed-off-by: Matt Spinler <>
Diffstat (limited to 'src/test')
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/propertywatchtest.cpp b/src/test/propertywatchtest.cpp
index b92dbec..c97e8d3 100644
--- a/src/test/propertywatchtest.cpp
+++ b/src/test/propertywatchtest.cpp
@@ -27,7 +27,7 @@ const std::array<std::string, 2> properties =
const std::string meta;
-std::array<any_ns::any, 8> storage = { };
+std::array<std::tuple<any_ns::any, any_ns::any>, 8> storage = { };
const PropertyIndex watchIndex =
@@ -204,7 +204,7 @@ void testStart()
ndx = 0;
for (auto s : storage)
- ASSERT_EQ(s.empty(), false);
+ ASSERT_EQ(std::get<0>(s).empty(), false);
ASSERT_EQ(any_ns::any_cast<T>(s), ExpectedValues<T>::get(ndx));
OpenPOWER on IntegriCloud