summaryrefslogtreecommitdiffstats
path: root/src/test/propertywatchtest.cpp
diff options
context:
space:
mode:
authorMatt Spinler <spinler@us.ibm.com>2018-02-19 13:34:43 -0600
committerMatt Spinler <spinler@us.ibm.com>2018-02-23 13:51:48 -0600
commitabe43ab439bba463f4727a98ed0cc0c6a5e8251f (patch)
tree84416bf5d4d38ce4d7ced993596e5b661e3e38da /src/test/propertywatchtest.cpp
parentc458deea83b4356f07194691e301037d8e831d46 (diff)
downloadphosphor-dbus-monitor-abe43ab439bba463f4727a98ed0cc0c6a5e8251f.tar.gz
phosphor-dbus-monitor-abe43ab439bba463f4727a98ed0cc0c6a5e8251f.zip
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 <spinler@us.ibm.com>
Diffstat (limited to 'src/test/propertywatchtest.cpp')
-rw-r--r--src/test/propertywatchtest.cpp4
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));
++ndx;
}
OpenPOWER on IntegriCloud