Explicitly test for canonicity

This will come in handy later, with more complex test cases.
This commit is contained in:
Bruno BELANYI 2024-08-23 23:16:39 +01:00
parent 5868b5d36c
commit ce7cc4492c
2 changed files with 27 additions and 0 deletions

View file

@ -2,6 +2,9 @@
#include <map>
// Testing class forward declaration
class IntervalMapTest;
namespace amby {
template <typename K, typename V> class interval_map {
@ -21,6 +24,9 @@ public:
return std::prev(it)->second;
}
// Used in testing
friend class ::IntervalMapTest;
private:
V init_;
std::map<K, V> underlying_{};