forked from boostorg/unordered
Add incomplete_test
This commit is contained in:
@ -108,6 +108,7 @@ build_foa compile_set ;
|
|||||||
build_foa compile_map ;
|
build_foa compile_map ;
|
||||||
build_foa noexcept_tests ;
|
build_foa noexcept_tests ;
|
||||||
run unordered/link_test_1.cpp unordered/link_test_2.cpp : : : <cxxstd>98:<build>no <cxxstd>03:<build>no <cxxstd>0x:<build>no <define>BOOST_UNORDERED_FOA_TESTS : foa_link_test ;
|
run unordered/link_test_1.cpp unordered/link_test_2.cpp : : : <cxxstd>98:<build>no <cxxstd>03:<build>no <cxxstd>0x:<build>no <define>BOOST_UNORDERED_FOA_TESTS : foa_link_test ;
|
||||||
|
build_foa incomplete_test ;
|
||||||
build_foa constructor_tests ;
|
build_foa constructor_tests ;
|
||||||
build_foa copy_tests ;
|
build_foa copy_tests ;
|
||||||
build_foa move_tests ;
|
build_foa move_tests ;
|
||||||
|
@ -5,8 +5,14 @@
|
|||||||
|
|
||||||
// clang-format off
|
// clang-format off
|
||||||
#include "../helpers/prefix.hpp"
|
#include "../helpers/prefix.hpp"
|
||||||
|
#ifdef BOOST_UNORDERED_FOA_TESTS
|
||||||
|
#include <boost/unordered_flat_map.hpp>
|
||||||
|
#include <boost/unordered_flat_set.hpp>
|
||||||
|
#include <boost/unordered/detail/implementation.hpp>
|
||||||
|
#else
|
||||||
#include <boost/unordered_map.hpp>
|
#include <boost/unordered_map.hpp>
|
||||||
#include <boost/unordered_set.hpp>
|
#include <boost/unordered_set.hpp>
|
||||||
|
#endif
|
||||||
#include "../helpers/postfix.hpp"
|
#include "../helpers/postfix.hpp"
|
||||||
// clang-format on
|
// clang-format on
|
||||||
|
|
||||||
@ -15,7 +21,11 @@
|
|||||||
namespace x {
|
namespace x {
|
||||||
struct D
|
struct D
|
||||||
{
|
{
|
||||||
|
#ifdef BOOST_UNORDERED_FOA_TESTS
|
||||||
|
boost::unordered_flat_map<D, D> x;
|
||||||
|
#else
|
||||||
boost::unordered_map<D, D> x;
|
boost::unordered_map<D, D> x;
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -29,6 +39,17 @@ namespace incomplete_test {
|
|||||||
|
|
||||||
// Declare some instances
|
// Declare some instances
|
||||||
|
|
||||||
|
#ifdef BOOST_UNORDERED_FOA_TESTS
|
||||||
|
typedef boost::unordered_flat_map<value, value, hash, equals,
|
||||||
|
allocator<std::pair<value const, value> > >
|
||||||
|
map;
|
||||||
|
typedef boost::unordered_flat_map<value, value, hash, equals,
|
||||||
|
allocator<std::pair<value const, value> > >
|
||||||
|
multimap;
|
||||||
|
typedef boost::unordered_flat_set<value, hash, equals, allocator<value> > set;
|
||||||
|
typedef boost::unordered_flat_set<value, hash, equals, allocator<value> >
|
||||||
|
multiset;
|
||||||
|
#else
|
||||||
typedef boost::unordered_map<value, value, hash, equals,
|
typedef boost::unordered_map<value, value, hash, equals,
|
||||||
allocator<std::pair<value const, value> > >
|
allocator<std::pair<value const, value> > >
|
||||||
map;
|
map;
|
||||||
@ -38,6 +59,7 @@ namespace incomplete_test {
|
|||||||
typedef boost::unordered_set<value, hash, equals, allocator<value> > set;
|
typedef boost::unordered_set<value, hash, equals, allocator<value> > set;
|
||||||
typedef boost::unordered_multiset<value, hash, equals, allocator<value> >
|
typedef boost::unordered_multiset<value, hash, equals, allocator<value> >
|
||||||
multiset;
|
multiset;
|
||||||
|
#endif
|
||||||
|
|
||||||
// Now define the types which are stored as members, as they are needed for
|
// Now define the types which are stored as members, as they are needed for
|
||||||
// declaring struct members.
|
// declaring struct members.
|
||||||
@ -76,7 +98,28 @@ namespace incomplete_test {
|
|||||||
//
|
//
|
||||||
// Incomplete hash, equals and allocator aren't here supported at the
|
// Incomplete hash, equals and allocator aren't here supported at the
|
||||||
// moment.
|
// moment.
|
||||||
|
#ifdef BOOST_UNORDERED_FOA_TESTS
|
||||||
|
struct struct1
|
||||||
|
{
|
||||||
|
boost::unordered_flat_map<struct1, struct1, hash, equals,
|
||||||
|
allocator<std::pair<struct1 const, struct1> > >
|
||||||
|
x;
|
||||||
|
};
|
||||||
|
struct struct2
|
||||||
|
{
|
||||||
|
boost::unordered_flat_map<struct2, struct2, hash, equals,
|
||||||
|
allocator<std::pair<struct2 const, struct2> > >
|
||||||
|
x;
|
||||||
|
};
|
||||||
|
struct struct3
|
||||||
|
{
|
||||||
|
boost::unordered_flat_set<struct3, hash, equals, allocator<struct3> > x;
|
||||||
|
};
|
||||||
|
struct struct4
|
||||||
|
{
|
||||||
|
boost::unordered_flat_set<struct4, hash, equals, allocator<struct4> > x;
|
||||||
|
};
|
||||||
|
#else
|
||||||
struct struct1
|
struct struct1
|
||||||
{
|
{
|
||||||
boost::unordered_map<struct1, struct1, hash, equals,
|
boost::unordered_map<struct1, struct1, hash, equals,
|
||||||
@ -97,7 +140,7 @@ namespace incomplete_test {
|
|||||||
{
|
{
|
||||||
boost::unordered_multiset<struct4, hash, equals, allocator<struct4> > x;
|
boost::unordered_multiset<struct4, hash, equals, allocator<struct4> > x;
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
// Now define the value type.
|
// Now define the value type.
|
||||||
|
|
||||||
struct value
|
struct value
|
||||||
|
Reference in New Issue
Block a user