From abe43ab439bba463f4727a98ed0cc0c6a5e8251f Mon Sep 17 00:00:00 2001 From: Matt Spinler Date: Mon, 19 Feb 2018 13:34:43 -0600 Subject: 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 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 --- src/test/propertywatchtest.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/test') 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 properties = const std::string meta; -std::array storage = { }; +std::array, 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(s), ExpectedValues::get(ndx)); ++ndx; } -- cgit v1.2.1