summaryrefslogtreecommitdiffstats
path: root/src/test/templates/callbackgentest.mako.hpp
diff options
context:
space:
mode:
authorBrad Bishop <bradleyb@fuzziesquirrel.com>2017-05-25 21:31:58 -0400
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2017-06-19 16:26:47 -0400
commit3ce5c484aa9d25927b106f9bd3f819ec861176ad (patch)
treeaa8f818fd9456129035fdca375b5b7cba3e80bfa /src/test/templates/callbackgentest.mako.hpp
parentc1283ae8472dbd4e2c3593b76b7600ac72640b80 (diff)
downloadphosphor-dbus-monitor-3ce5c484aa9d25927b106f9bd3f819ec861176ad.tar.gz
phosphor-dbus-monitor-3ce5c484aa9d25927b106f9bd3f819ec861176ad.zip
Add testcase for callbacks
Change-Id: Iff1ddb9c18b5384d05a4d2dbfba95ade8cc1783c Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'src/test/templates/callbackgentest.mako.hpp')
-rw-r--r--src/test/templates/callbackgentest.mako.hpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/test/templates/callbackgentest.mako.hpp b/src/test/templates/callbackgentest.mako.hpp
new file mode 100644
index 0000000..f387c23
--- /dev/null
+++ b/src/test/templates/callbackgentest.mako.hpp
@@ -0,0 +1,17 @@
+auto storageCount = ${len(instances)};
+
+const std::array<Index, ${len(instancegroups)}> indicies = {{
+% for g in instancegroups:
+ {
+ % for i in g.members:
+ {Index::key_type{${i[0]}, ${i[2]}, ${i[3]}}, ${i[5]}},
+ % endfor
+ },
+% endfor
+}};
+
+const std::array<std::tuple<std::string, size_t>, ${len(callbacks)}> callbacks = {{
+% for c in callbacks:
+ std::tuple<std::string, size_t>{"${c.datatype}", ${c.instances}},
+% endfor
+}};
OpenPOWER on IntegriCloud