summaryrefslogtreecommitdiff
path: root/test/testHelpers.h
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2024-06-30 12:30:48 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2024-06-30 12:30:48 +0100
commit340dc8fa5be06ed909fe54bc4ca135921dc70cae (patch)
tree940c95c22757e60a0ae3bad997fb6240a6c9dba2 /test/testHelpers.h
parentImplement partition on InstanceVertices (diff)
downloadilt-340dc8fa5be06ed909fe54bc4ca135921dc70cae.tar.bz2
ilt-340dc8fa5be06ed909fe54bc4ca135921dc70cae.tar.xz
ilt-340dc8fa5be06ed909fe54bc4ca135921dc70cae.zip
Maintain a reverse index in instance vertices
Removes need to search unused and/or index when moving/adding things
Diffstat (limited to 'test/testHelpers.h')
-rw-r--r--test/testHelpers.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/testHelpers.h b/test/testHelpers.h
index c9fd6dc..a261b3d 100644
--- a/test/testHelpers.h
+++ b/test/testHelpers.h
@@ -51,3 +51,11 @@ loadFixtureJson(const std::filesystem::path & path)
BOOST_CHECK(VAR); \
} \
else
+
+#define BOOST_CHECK_EQUAL_COLCOL(cola_, colb_) \
+ BOOST_CHECK_EQUAL_COLLECTIONS(cola_.begin(), cola_.end(), colb_.begin(), colb_.end())
+#define BOOST_CHECK_EQUAL_COLVALS(col_, ...) \
+ { \
+ const std::initializer_list<decltype(col_)::value_type> vals {__VA_ARGS__}; \
+ BOOST_CHECK_EQUAL_COLLECTIONS(col_.begin(), col_.end(), vals.begin(), vals.end()); \
+ }