Expand flat_map testing coverage

This commit is contained in:
Ion Gaztañaga
2024-09-09 00:57:30 +02:00
parent c552a23d96
commit daa81ed5bb
3 changed files with 331 additions and 244 deletions
+13 -14
View File
@@ -17,7 +17,7 @@
#include <boost/container/detail/container_or_allocator_rebind.hpp>
#include "map_test.hpp"
#include "flat_map_test.hpp"
#include <map>
using namespace boost::container;
@@ -54,58 +54,57 @@ int main()
typedef std::map<int, int> MyStdMap;
typedef std::multimap<int, int> MyStdMultiMap;
if (0 != test::map_test
if (0 != test::flat_map_test
< GetMapContainer<vector<std::pair<int, int> > >::apply<int>::map_type
, MyStdMap
, GetMapContainer<vector<std::pair<int, int> > >::apply<int>::multimap_type
, MyStdMultiMap>()) {
std::cout << "Error in map_test<vector<std::pair<int, int> > >" << std::endl;
std::cout << "Error in flat_map_test<vector<std::pair<int, int> > >" << std::endl;
return 1;
}
if (0 != test::map_test
if (0 != test::flat_map_test
< GetMapContainer<small_vector<std::pair<int, int>, 7> >::apply<int>::map_type
, MyStdMap
, GetMapContainer<small_vector<std::pair<int, int>, 7> >::apply<int>::multimap_type
, MyStdMultiMap>()) {
std::cout << "Error in map_test<small_vector<std::pair<int, int>, 7> >" << std::endl;
std::cout << "Error in flat_map_test<small_vector<std::pair<int, int>, 7> >" << std::endl;
return 1;
}
if (0 != test::map_test
if (0 != test::flat_map_test
< GetMapContainer<static_vector<std::pair<int, int>, MaxElem * 10> >::apply<int>::map_type
, MyStdMap
, GetMapContainer<static_vector<std::pair<int, int>, MaxElem * 10> >::apply<int>::multimap_type
, MyStdMultiMap>()) {
std::cout << "Error in map_test<static_vector<std::pair<int, int>, MaxElem * 10> >" << std::endl;
std::cout << "Error in flat_map_test<static_vector<std::pair<int, int>, MaxElem * 10> >" << std::endl;
return 1;
}
if (0 != test::map_test
if (0 != test::flat_map_test
< GetMapContainer<stable_vector<std::pair<int, int> > >::apply<int>::map_type
, MyStdMap
, GetMapContainer<stable_vector<std::pair<int, int> > >::apply<int>::multimap_type
, MyStdMultiMap>()) {
std::cout << "Error in map_test<stable_vector<std::pair<int, int> > >" << std::endl;
std::cout << "Error in flat_map_test<stable_vector<std::pair<int, int> > >" << std::endl;
return 1;
}
if (0 != test::map_test
if (0 != test::flat_map_test
< GetMapContainer<deque<std::pair<int, int> > >::apply<int>::map_type
, MyStdMap
, GetMapContainer<deque<std::pair<int, int> > >::apply<int>::multimap_type
, MyStdMultiMap>()) {
std::cout << "Error in map_test<deque<std::pair<int, int> > >" << std::endl;
std::cout << "Error in flat_map_test<deque<std::pair<int, int> > >" << std::endl;
return 1;
}
if (0 != test::map_test
if (0 != test::flat_map_test
< GetMapContainer<devector<std::pair<int, int> > >::apply<int>::map_type
, MyStdMap
, GetMapContainer<devector<std::pair<int, int> > >::apply<int>::multimap_type
, MyStdMultiMap>()) {
std::cout << "Error in map_test<vector<std::pair<int, int> > >" << std::endl;
std::cout << "Error in flat_map_test<vector<std::pair<int, int> > >" << std::endl;
return 1;
}
}