gcc/libstdc++-v3/testsuite
François Dumont 9662c9526f
libstdc++: Add _GLIBCXX_DEBUG checks on unordered container local_iterator
Complete tests on  _GLIBCXX_DEBUG checks in include/debug/safe_local_iterator.h.

Fix several tests not testing the container corresponding to their location in the
testsuite directory.

libstdc++-v3/ChangeLog:

	* testsuite/util/debug/unordered_checks.h (fill_container): New helper method.
	(use_erased_local_iterator, invalid_local_iterator_pre_increment)
	(invalid_local_iterator_post_increment, invalid_local_iterator_compare)
	(invalid_local_iterator_range): Use latter.
	(fill_and_get_local_iterator): New, use fill_container.
	(use_invalid_local_iterator): Use latter.
	(invalid_local_iterator_arrow_operator): New test function.
	(invalid_local_iterator_copy_instantiation): New test function.
	(invalid_local_iterator_move_instantiation): New test function.
	(invalid_local_iterator_copy_assignment): New test function.
	(invalid_local_iterator_move_assignment): New test function.
	(invalid_local_iterator_const_conversion): New test function.
	* testsuite/23_containers/unordered_map/debug/invalid_local_iterator_arrow_operator_neg.cc:
	New test case.
	* testsuite/23_containers/unordered_map/debug/invalid_local_iterator_const_conversion_neg.cc:
	New test case.
	* testsuite/23_containers/unordered_map/debug/invalid_local_iterator_copy_assignment_neg.cc:
	New test case.
	* testsuite/23_containers/unordered_map/debug/invalid_local_iterator_copy_construction_neg.cc:
	New test case.
	* testsuite/23_containers/unordered_map/debug/invalid_local_iterator_move_assignment_neg.cc:
	New test case.
	* testsuite/23_containers/unordered_map/debug/invalid_local_iterator_move_construction_neg.cc:
	New test case.
	* testsuite/23_containers/unordered_map/debug/max_load_factor_neg.cc: Test unordered_map.
	* testsuite/23_containers/unordered_multimap/debug/begin2_neg.cc: Test unordered_multimap.
	* testsuite/23_containers/unordered_multimap/debug/bucket_size_neg.cc: Likewise.
	* testsuite/23_containers/unordered_multimap/debug/cbegin_neg.cc: Likewise.
	* testsuite/23_containers/unordered_multimap/debug/cend_neg.cc: Likewise.
	* testsuite/23_containers/unordered_multimap/debug/end1_neg.cc: Likewise.
	* testsuite/23_containers/unordered_multimap/debug/end2_neg.cc: Likewise.
	* testsuite/23_containers/unordered_multimap/debug/invalid_local_iterator_arrow_operator_neg.cc:
	New test case.
	* testsuite/23_containers/unordered_multimap/debug/invalid_local_iterator_const_conversion_neg.cc:
	New test case.
	* testsuite/23_containers/unordered_multimap/debug/invalid_local_iterator_copy_assignment_neg.cc:
	New test case.
	* testsuite/23_containers/unordered_multimap/debug/invalid_local_iterator_copy_construction_neg.cc:
	New test case.
	* testsuite/23_containers/unordered_multimap/debug/invalid_local_iterator_move_assignment_neg.cc:
	New test case.
	* testsuite/23_containers/unordered_multimap/debug/invalid_local_iterator_move_construction_neg.cc:
	New test case.
	* testsuite/23_containers/unordered_multimap/debug/max_load_factor_neg.cc:
	Test unordered_multimap.
	* testsuite/23_containers/unordered_multiset/debug/invalid_local_iterator_arrow_operator_neg.cc:
	New test case.
	* testsuite/23_containers/unordered_multiset/debug/invalid_local_iterator_const_conversion_neg.cc:
	New test case.
	* testsuite/23_containers/unordered_multiset/debug/invalid_local_iterator_copy_assignment_neg.cc:
	New test case.
	* testsuite/23_containers/unordered_multiset/debug/invalid_local_iterator_copy_construction_neg.cc:
	New test case.
	* testsuite/23_containers/unordered_multiset/debug/invalid_local_iterator_move_assignment_neg.cc:
	New test case.
	* testsuite/23_containers/unordered_multiset/debug/invalid_local_iterator_move_construction_neg.cc:
	New test case.
	* testsuite/23_containers/unordered_set/debug/invalid_local_iterator_arrow_operator_neg.cc:
	New test case.
	* testsuite/23_containers/unordered_set/debug/invalid_local_iterator_const_conversion_neg.cc:
	New test case.
	* testsuite/23_containers/unordered_set/debug/invalid_local_iterator_copy_assignment_neg.cc:
	New test case.
	* testsuite/23_containers/unordered_set/debug/invalid_local_iterator_copy_construction_neg.cc:
	New test case.
	* testsuite/23_containers/unordered_set/debug/invalid_local_iterator_move_assignment_neg.cc:
	New test case.
	* testsuite/23_containers/unordered_set/debug/invalid_local_iterator_move_construction_neg.cc:
	New test case.

Reviewed-by: Jonathan Wakely <jwakely@redhat.com>
2025-04-18 21:26:46 +02:00
..
17_intro libstdc++: Do not declare namespace ranges in <numeric> unconditionally 2025-04-15 17:34:34 +01:00
18_support libstdc++-v3 testsuite: fix malformed dg-require-static-libstdcxx directives 2025-03-27 20:00:34 -04:00
19_diagnostics Update copyright years. 2025-01-02 11:59:57 +01:00
20_util c++: improve pack index diagnostics 2025-04-17 13:19:42 -04:00
21_strings libstdc++: Fix std::string construction from volatile char* [PR119748] 2025-04-15 09:24:58 +01:00
22_locale Update copyright years. 2025-01-02 11:59:57 +01:00
23_containers libstdc++: Add _GLIBCXX_DEBUG checks on unordered container local_iterator 2025-04-18 21:26:46 +02:00
24_iterators libstdc++: Fix std::ranges::iter_move for function references [PR119469] 2025-03-27 11:14:52 +00:00
25_algorithms libstdc++: re-bump the feature-test macro for P2562R1 [PR119488] 2025-03-27 13:47:30 +01:00
26_numerics libstdc++: Implement <stdckdint.h> for C++26 (P3370R1) 2025-03-13 14:45:38 +00:00
27_io libstdc++: Add testcase for std::filesystem::copy [PR118699] 2025-03-25 12:33:38 +00:00
28_regex libstdc++: Fix comments in test that reference wrong subclause of C++11 2025-01-15 14:34:41 +00:00
29_atomics libstdc++: constrain std::atomic's default constructor 2025-03-08 19:47:15 +01:00
30_threads libstdc++: Add static_assert to std::packaged_task::packaged_task(F&&) 2025-03-12 17:02:12 +00:00
abi Update copyright years. 2025-01-02 11:59:57 +01:00
backward Update copyright years. 2025-01-02 11:59:57 +01:00
config Update copyright years. 2025-01-02 11:59:57 +01:00
data
decimal Update copyright years. 2025-01-02 11:59:57 +01:00
experimental Update copyright years. 2025-01-02 11:59:57 +01:00
ext Update copyright years. 2025-01-02 11:59:57 +01:00
lib libstdc++, testsuite, Darwin: Prune a new linker warning present form XCode 16. 2025-04-02 15:04:17 +01:00
libstdc++-abi Update copyright years. 2025-01-02 11:59:57 +01:00
libstdc++-dg Update copyright years. 2025-01-02 11:59:57 +01:00
libstdc++-prettyprinters Update copyright years. 2025-01-02 11:59:57 +01:00
libstdc++-xmethods Update copyright years. 2025-01-02 11:59:57 +01:00
performance Update copyright years. 2025-01-02 11:59:57 +01:00
special_functions Update copyright years. 2025-01-02 11:59:57 +01:00
std libstdc++: Do not use 'not' alternative token in <format> 2025-04-17 10:11:49 +01:00
tr1 Update copyright years. 2025-01-02 11:59:57 +01:00
tr2 Update copyright years. 2025-01-02 11:59:57 +01:00
util libstdc++: Add _GLIBCXX_DEBUG checks on unordered container local_iterator 2025-04-18 21:26:46 +02:00
Makefile.am Update copyright years. 2025-01-02 11:59:57 +01:00
Makefile.in libstdc++: Add support for running tests with multiple -std options 2023-09-15 21:57:38 +01:00