mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-12-23 02:18:52 +00:00
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;
|
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