unit_tests: added gtest utility ASSERT_EQ_MAP for easily testing key-value map
This commit is contained in:
parent
ed67e5c001
commit
e6a6093871
@ -65,3 +65,10 @@ namespace unit_test
|
||||
std::atomic<size_t> m_counter;
|
||||
};
|
||||
}
|
||||
|
||||
# define ASSERT_EQ_MAP(val, map, key) \
|
||||
do { \
|
||||
auto found = map.find(key); \
|
||||
ASSERT_TRUE(found != map.end()); \
|
||||
ASSERT_EQ(val, found->second); \
|
||||
} while (false)
|
||||
|
Loading…
Reference in New Issue
Block a user