Skip to content

Commit

Permalink
Update libcxx tests
Browse files Browse the repository at this point in the history
  • Loading branch information
morzhovets committed Nov 1, 2024
1 parent 6febdbc commit 0b8acd7
Show file tree
Hide file tree
Showing 96 changed files with 7,141 additions and 683 deletions.
14 changes: 13 additions & 1 deletion test/sources/libcxx/MapTests.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,14 +118,20 @@ LIBCXX_TEST_END

#ifdef LIBCPP_HAS_BAD_NEWS_FOR_MOMO
LIBCXX_TEST_BEGIN(cons_default_recursive)
#include "map/map.cons/default_recursive.pass.cpp"
#include "map/map.cons/default_recursive.compile.pass.cpp"
LIBCXX_TEST_END
#endif

LIBCXX_TEST_BEGIN(cons_dtor_noexcept)
#include "map/map.cons/dtor_noexcept.pass.cpp"
LIBCXX_TEST_END

#if TEST_STD_VER >= 23
LIBCXX_TEST_BEGIN(cons_from_range)
#include "map/map.cons/from_range.pass.cpp"
LIBCXX_TEST_END
#endif

LIBCXX_TEST_BEGIN(cons_initializer_list)
#include "map/map.cons/initializer_list.pass.cpp"
LIBCXX_TEST_END
Expand Down Expand Up @@ -242,6 +248,12 @@ LIBCXX_TEST_BEGIN(modifiers_insert_or_assign)
#include "map/map.modifiers/insert_or_assign.pass.cpp"
LIBCXX_TEST_END

#if TEST_STD_VER >= 23
LIBCXX_TEST_BEGIN(modifiers_insert_range)
#include "map/map.modifiers/insert_range.pass.cpp"
LIBCXX_TEST_END
#endif

LIBCXX_TEST_BEGIN(modifiers_insert_rv)
#include "map/map.modifiers/insert_rv.pass.cpp"
LIBCXX_TEST_END
Expand Down
14 changes: 13 additions & 1 deletion test/sources/libcxx/MultiMapTests.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,14 +114,20 @@ LIBCXX_TEST_END

#ifdef LIBCPP_HAS_BAD_NEWS_FOR_MOMO
LIBCXX_TEST_BEGIN(cons_default_recursive)
#include "multimap/multimap.cons/default_recursive.pass.cpp"
#include "multimap/multimap.cons/default_recursive.compile.pass.cpp"
LIBCXX_TEST_END
#endif

LIBCXX_TEST_BEGIN(cons_dtor_noexcept)
#include "multimap/multimap.cons/dtor_noexcept.pass.cpp"
LIBCXX_TEST_END

#if TEST_STD_VER >= 23
LIBCXX_TEST_BEGIN(cons_from_range)
#include "multimap/multimap.cons/from_range.pass.cpp"
LIBCXX_TEST_END
#endif

LIBCXX_TEST_BEGIN(cons_initializer_list)
#include "multimap/multimap.cons/initializer_list.pass.cpp"
LIBCXX_TEST_END
Expand Down Expand Up @@ -234,6 +240,12 @@ LIBCXX_TEST_BEGIN(modifiers_insert_node_type_hint)
#include "multimap/multimap.modifiers/insert_node_type_hint.pass.cpp"
LIBCXX_TEST_END

#if TEST_STD_VER >= 23
LIBCXX_TEST_BEGIN(modifiers_insert_range)
#include "multimap/multimap.modifiers/insert_range.pass.cpp"
LIBCXX_TEST_END
#endif

LIBCXX_TEST_BEGIN(modifiers_insert_rv)
#include "multimap/multimap.modifiers/insert_rv.pass.cpp"
LIBCXX_TEST_END
Expand Down
12 changes: 12 additions & 0 deletions test/sources/libcxx/MultiSetTests.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,12 @@ LIBCXX_TEST_BEGIN(insert_node_type_hint)
#include "multiset/insert_node_type_hint.pass.cpp"
LIBCXX_TEST_END

#if TEST_STD_VER >= 23
LIBCXX_TEST_BEGIN(insert_range)
#include "multiset/insert_range.pass.cpp"
LIBCXX_TEST_END
#endif

LIBCXX_TEST_BEGIN(insert_rv)
#include "multiset/insert_rv.pass.cpp"
LIBCXX_TEST_END
Expand Down Expand Up @@ -208,6 +214,12 @@ LIBCXX_TEST_BEGIN(cons_dtor_noexcept)
#include "multiset/multiset.cons/dtor_noexcept.pass.cpp"
LIBCXX_TEST_END

#if TEST_STD_VER >= 23
LIBCXX_TEST_BEGIN(cons_from_range)
#include "multiset/multiset.cons/from_range.pass.cpp"
LIBCXX_TEST_END
#endif

LIBCXX_TEST_BEGIN(cons_initializer_list)
#include "multiset/multiset.cons/initializer_list.pass.cpp"
LIBCXX_TEST_END
Expand Down
12 changes: 12 additions & 0 deletions test/sources/libcxx/SetTests.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,12 @@ LIBCXX_TEST_BEGIN(insert_node_type_hint)
#include "set/insert_node_type_hint.pass.cpp"
LIBCXX_TEST_END

#if TEST_STD_VER >= 23
LIBCXX_TEST_BEGIN(insert_range)
#include "set/insert_range.pass.cpp"
LIBCXX_TEST_END
#endif

LIBCXX_TEST_BEGIN(insert_rv)
#include "set/insert_rv.pass.cpp"
LIBCXX_TEST_END
Expand Down Expand Up @@ -204,6 +210,12 @@ LIBCXX_TEST_BEGIN(cons_dtor_noexcept)
#include "set/set.cons/dtor_noexcept.pass.cpp"
LIBCXX_TEST_END

#if TEST_STD_VER >= 23
LIBCXX_TEST_BEGIN(cons_from_range)
#include "set/set.cons/from_range.pass.cpp"
LIBCXX_TEST_END
#endif

LIBCXX_TEST_BEGIN(cons_initializer_list)
#include "set/set.cons/initializer_list.pass.cpp"
LIBCXX_TEST_END
Expand Down
14 changes: 14 additions & 0 deletions test/sources/libcxx/Support.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,18 @@
#include "support/asan_testing.h"
#include "support/min_allocator.h"

#if TEST_STD_VER >= 23
# include "support/insert_range_sequence_containers.h"
# include "support/from_range_sequence_containers.h"
# include "support/insert_range_maps_sets.h"
# include "support/from_range_associative_containers.h"
# include "support/from_range_unordered_containers.h"
#else
namespace libcxx_insert_range_seq {}
namespace libcxx_from_range_seq {}
namespace libcxx_insert_range_maps_sets {}
namespace libcxx_from_range_assoc {}
namespace libcxx_from_range_unord {}
#endif

#define TEST_LIBCPP_ASSERT_FAILURE(expr, mess) try { (void)(expr); assert(false); } catch (...) {}
24 changes: 24 additions & 0 deletions test/sources/libcxx/UnorderedMapTests.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ LIBCXX_TEST_BEGIN(empty)
#include "unord.map/empty.pass.cpp"
LIBCXX_TEST_END

LIBCXX_TEST_BEGIN(eq_different_hash)
#include "unord.map/eq.different_hash.pass.cpp"
LIBCXX_TEST_END

LIBCXX_TEST_BEGIN(eq)
#include "unord.map/eq.pass.cpp"
LIBCXX_TEST_END
Expand Down Expand Up @@ -82,6 +86,10 @@ LIBCXX_TEST_BEGIN(get_allocator)
#include "unord.map/get_allocator.pass.cpp"
LIBCXX_TEST_END

LIBCXX_TEST_BEGIN(hash_function)
#include "unord.map/hash_function.pass.cpp"
LIBCXX_TEST_END

#ifdef LIBCPP_HAS_BAD_NEWS_FOR_MOMO
LIBCXX_TEST_BEGIN(incomplete_type)
#include "unord.map/incomplete_type.pass.cpp"
Expand All @@ -96,6 +104,10 @@ LIBCXX_TEST_BEGIN(iterators)
#include "unord.map/iterators.pass.cpp"
LIBCXX_TEST_END

LIBCXX_TEST_BEGIN(key_eq)
#include "unord.map/key_eq.pass.cpp"
LIBCXX_TEST_END

LIBCXX_TEST_BEGIN(load_factor)
#include "unord.map/load_factor.pass.cpp"
LIBCXX_TEST_END
Expand Down Expand Up @@ -262,6 +274,12 @@ LIBCXX_TEST_BEGIN(cnstr_init)
#include "unord.map/unord.map.cnstr/init.pass.cpp"
LIBCXX_TEST_END

#if TEST_STD_VER >= 23
LIBCXX_TEST_BEGIN(cnstr_from_range)
#include "unord.map/unord.map.cnstr/from_range.pass.cpp"
LIBCXX_TEST_END
#endif

LIBCXX_TEST_BEGIN(cnstr_init_size)
#include "unord.map/unord.map.cnstr/init_size.pass.cpp"
LIBCXX_TEST_END
Expand Down Expand Up @@ -414,6 +432,10 @@ LIBCXX_TEST_BEGIN(modifiers_insert_init)
#include "unord.map/unord.map.modifiers/insert_init.pass.cpp"
LIBCXX_TEST_END

LIBCXX_TEST_BEGIN(modifiers_insert_iter_iter)
#include "unord.map/unord.map.modifiers/insert_iter_iter.pass.cpp"
LIBCXX_TEST_END

LIBCXX_TEST_BEGIN(modifiers_insert_node_type)
#include "unord.map/unord.map.modifiers/insert_node_type.pass.cpp"
LIBCXX_TEST_END
Expand All @@ -426,9 +448,11 @@ LIBCXX_TEST_BEGIN(modifiers_insert_or_assign)
#include "unord.map/unord.map.modifiers/insert_or_assign.pass.cpp"
LIBCXX_TEST_END

#if TEST_STD_VER >= 23
LIBCXX_TEST_BEGIN(modifiers_insert_range)
#include "unord.map/unord.map.modifiers/insert_range.pass.cpp"
LIBCXX_TEST_END
#endif

LIBCXX_TEST_BEGIN(modifiers_insert_rvalue)
#include "unord.map/unord.map.modifiers/insert_rvalue.pass.cpp"
Expand Down
24 changes: 24 additions & 0 deletions test/sources/libcxx/UnorderedMultiMapTests.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ LIBCXX_TEST_BEGIN(empty)
#include "unord.multimap/empty.pass.cpp"
LIBCXX_TEST_END

LIBCXX_TEST_BEGIN(eq_different_hash)
#include "unord.multimap/eq.different_hash.pass.cpp"
LIBCXX_TEST_END

LIBCXX_TEST_BEGIN(eq)
#include "unord.multimap/eq.pass.cpp"
LIBCXX_TEST_END
Expand Down Expand Up @@ -62,6 +66,10 @@ LIBCXX_TEST_BEGIN(get_allocator)
#include "unord.multimap/get_allocator.pass.cpp"
LIBCXX_TEST_END

LIBCXX_TEST_BEGIN(hash_function)
#include "unord.multimap/hash_function.pass.cpp"
LIBCXX_TEST_END

#ifdef LIBCPP_HAS_BAD_NEWS_FOR_MOMO
LIBCXX_TEST_BEGIN(incomplete)
#include "unord.multimap/incomplete.pass.cpp"
Expand All @@ -76,6 +84,10 @@ LIBCXX_TEST_BEGIN(iterators)
#include "unord.multimap/iterators.pass.cpp"
LIBCXX_TEST_END

LIBCXX_TEST_BEGIN(key_eq)
#include "unord.multimap/key_eq.pass.cpp"
LIBCXX_TEST_END

LIBCXX_TEST_BEGIN(max_size)
#include "unord.multimap/max_size.pass.cpp"
LIBCXX_TEST_END
Expand Down Expand Up @@ -193,6 +205,12 @@ LIBCXX_TEST_BEGIN(cnstr_dtor_noexcept)
#include "unord.multimap/unord.multimap.cnstr/dtor_noexcept.pass.cpp"
LIBCXX_TEST_END

#if TEST_STD_VER >= 23
LIBCXX_TEST_BEGIN(cnstr_from_range)
#include "unord.multimap/unord.multimap.cnstr/from_range.pass.cpp"
LIBCXX_TEST_END
#endif

LIBCXX_TEST_BEGIN(cnstr_init)
#include "unord.multimap/unord.multimap.cnstr/init.pass.cpp"
LIBCXX_TEST_END
Expand Down Expand Up @@ -333,9 +351,15 @@ LIBCXX_TEST_BEGIN(modifiers_insert_init)
#include "unord.multimap/unord.multimap.modifiers/insert_init.pass.cpp"
LIBCXX_TEST_END

LIBCXX_TEST_BEGIN(modifiers_insert_iter_iter)
#include "unord.multimap/unord.multimap.modifiers/insert_iter_iter.pass.cpp"
LIBCXX_TEST_END

#if TEST_STD_VER >= 23
LIBCXX_TEST_BEGIN(modifiers_insert_range)
#include "unord.multimap/unord.multimap.modifiers/insert_range.pass.cpp"
LIBCXX_TEST_END
#endif

LIBCXX_TEST_BEGIN(modifiers_insert_rvalue)
#include "unord.multimap/unord.multimap.modifiers/insert_rvalue.pass.cpp"
Expand Down
30 changes: 30 additions & 0 deletions test/sources/libcxx/UnorderedSetTests.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ LIBCXX_TEST_BEGIN(empty)
#include "unord.set/empty.pass.cpp"
LIBCXX_TEST_END

LIBCXX_TEST_BEGIN(eq_different_hash)
#include "unord.set/eq.different_hash.pass.cpp"
LIBCXX_TEST_END

LIBCXX_TEST_BEGIN(eq)
#include "unord.set/eq.pass.cpp"
LIBCXX_TEST_END
Expand Down Expand Up @@ -110,6 +114,10 @@ LIBCXX_TEST_BEGIN(get_allocator)
#include "unord.set/get_allocator.pass.cpp"
LIBCXX_TEST_END

LIBCXX_TEST_BEGIN(hash_function)
#include "unord.set/hash_function.pass.cpp"
LIBCXX_TEST_END

#ifdef LIBCPP_HAS_BAD_NEWS_FOR_MOMO
LIBCXX_TEST_BEGIN(incomplete)
#include "unord.set/incomplete.pass.cpp"
Expand All @@ -136,6 +144,10 @@ LIBCXX_TEST_BEGIN(insert_init)
#include "unord.set/insert_init.pass.cpp"
LIBCXX_TEST_END

LIBCXX_TEST_BEGIN(insert_iter_iter)
#include "unord.set/insert_iter_iter.pass.cpp"
LIBCXX_TEST_END

LIBCXX_TEST_BEGIN(insert_node_type)
#include "unord.set/insert_node_type.pass.cpp"
LIBCXX_TEST_END
Expand All @@ -144,9 +156,11 @@ LIBCXX_TEST_BEGIN(insert_node_type_hint)
#include "unord.set/insert_node_type_hint.pass.cpp"
LIBCXX_TEST_END

#if TEST_STD_VER >= 23
LIBCXX_TEST_BEGIN(insert_range)
#include "unord.set/insert_range.pass.cpp"
LIBCXX_TEST_END
#endif

LIBCXX_TEST_BEGIN(insert_rvalue)
#include "unord.set/insert_rvalue.pass.cpp"
Expand All @@ -160,6 +174,10 @@ LIBCXX_TEST_BEGIN(iterators)
#include "unord.set/iterators.pass.cpp"
LIBCXX_TEST_END

LIBCXX_TEST_BEGIN(key_eq)
#include "unord.set/key_eq.pass.cpp"
LIBCXX_TEST_END

LIBCXX_TEST_BEGIN(load_factor)
#include "unord.set/load_factor.pass.cpp"
LIBCXX_TEST_END
Expand Down Expand Up @@ -212,6 +230,12 @@ LIBCXX_TEST_BEGIN(common_iterator_difference_type)
#include "unord.set/common/iterator_difference_type.pass.cpp"
LIBCXX_TEST_END

#if TEST_STD_VER >= 23
LIBCXX_TEST_BEGIN(extra_insert_range_ext)
#include "unord.set/extra/insert_range_ext.pass.cpp"
LIBCXX_TEST_END
#endif

#ifdef LIBCXX_TEST_FAILURE

LIBCXX_TEST_BEGIN(spec_assert_bucket)
Expand Down Expand Up @@ -304,6 +328,12 @@ LIBCXX_TEST_BEGIN(cnstr_dtor_noexcept)
#include "unord.set/unord.set.cnstr/dtor_noexcept.pass.cpp"
LIBCXX_TEST_END

#if TEST_STD_VER >= 23
LIBCXX_TEST_BEGIN(cnstr_from_range)
#include "unord.set/unord.set.cnstr/from_range.pass.cpp"
LIBCXX_TEST_END
#endif

LIBCXX_TEST_BEGIN(cnstr_init)
#include "unord.set/unord.set.cnstr/init.pass.cpp"
LIBCXX_TEST_END
Expand Down
Loading

0 comments on commit 0b8acd7

Please sign in to comment.