gcc/libstdc++-v3/testsuite/25_algorithms
Jonathan Wakely f6c71c2079
libstdc++: Fix VERIFY(idx = 1) bugs in tests
These should be checking for equality, not performing assignments.

The tests for from_range on associative containers were actually
checking the wrong thing, but the bug in the is_equal function was
making the incorrect checks pass anyway, because all the values being
used were non-zero, so the result of lhs.id = rhs.id was true, but would
have been false if lhs.id == rhs.id had been used as intended.

libstdc++-v3/ChangeLog:

	* testsuite/21_strings/basic_string/numeric_conversions/char/stoi.cc:
	Fix assignment used instead of equality comparison.
	* testsuite/21_strings/basic_string/numeric_conversions/char/stol.cc:
	Likewise.
	* testsuite/21_strings/basic_string/numeric_conversions/char/stoll.cc:
	Likewise.
	* testsuite/21_strings/basic_string/numeric_conversions/char/stoul.cc:
	Likewise.
	* testsuite/21_strings/basic_string/numeric_conversions/char/stoull.cc:
	Likewise.
	* testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoi.cc:
	Likewise.
	* testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stol.cc:
	Likewise.
	* testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoll.cc:
	Likewise.
	* testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoul.cc:
	Likewise.
	* testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoull.cc:
	Likewise.
	* testsuite/23_containers/map/cons/from_range.cc: Fix is_equal
	function and expected value of comparison functions after
	construction.
	* testsuite/23_containers/multimap/cons/from_range.cc: Likewise.
	* testsuite/23_containers/multiset/cons/from_range.cc: Likewise.
	* testsuite/23_containers/set/cons/from_range.cc: Likewise.
	* testsuite/23_containers/unordered_map/cons/from_range.cc: Fix
	is_equal functions.
	* testsuite/23_containers/unordered_multimap/cons/from_range.cc:
	Likewise.
	* testsuite/23_containers/unordered_multiset/cons/from_range.cc:
	Likewise.
	* testsuite/23_containers/unordered_set/cons/from_range.cc:
	Likewise.
	* testsuite/25_algorithms/minmax/constrained.cc: Fix assignment
	used instead of equality comparison.
	* testsuite/27_io/manipulators/extended/get_time/wchar_t/1.cc:
	Likewise.
2025-09-27 21:17:40 +01:00
..
adjacent_find Update copyright years. 2025-01-02 11:59:57 +01:00
advance/istreambuf_iterators Update copyright years. 2025-01-02 11:59:57 +01:00
all_of Update copyright years. 2025-01-02 11:59:57 +01:00
any_of Update copyright years. 2025-01-02 11:59:57 +01:00
binary_search Update copyright years. 2025-01-02 11:59:57 +01:00
clamp libstdc++: perfectly forward std::ranges::clamp arguments 2025-01-20 10:49:48 -05:00
contains libstdc++: Add some missing ranges feature-test macro tests 2024-08-22 11:24:07 -04:00
contains_subrange libstdc++: Remove dg-options "-std=gnu++23" from remaining tests 2023-09-15 21:57:40 +01:00
copy libstdc++: Tweak dg-error patterns for C++26 constexpr changes 2025-07-15 15:11:06 +01:00
copy_backward libstdc++: Tweak dg-error patterns for C++26 constexpr changes 2025-07-15 15:11:06 +01:00
copy_if Update copyright years. 2025-01-02 11:59:57 +01:00
copy_n libstdc++: Simplify __memcpyable_iterators concept 2025-03-08 10:39:56 +00:00
count Update copyright years. 2025-01-02 11:59:57 +01:00
count_if Update copyright years. 2025-01-02 11:59:57 +01:00
ends_with libstdc++: Implement C++23 P1659R3 starts_with and ends_with 2025-06-04 10:29:47 -04:00
equal libstdc++: Tweak dg-error patterns for C++26 constexpr changes 2025-07-15 15:11:06 +01:00
equal_range Update copyright years. 2025-01-02 11:59:57 +01:00
fill Update copyright years. 2025-01-02 11:59:57 +01:00
fill_n libstdc++: Fix algorithms to use iterators' difference_type for arithmetic [PR121890] 2025-09-12 21:46:48 +01:00
find Update copyright years. 2025-01-02 11:59:57 +01:00
find_end Update copyright years. 2025-01-02 11:59:57 +01:00
find_first_of Update copyright years. 2025-01-02 11:59:57 +01:00
find_if Update copyright years. 2025-01-02 11:59:57 +01:00
find_if_not Update copyright years. 2025-01-02 11:59:57 +01:00
find_last libstdc++: Add some missing ranges feature-test macro tests 2024-08-22 11:24:07 -04:00
find_last_if libstdc++: Remove dg-options "-std=gnu++23" from remaining tests 2023-09-15 21:57:40 +01:00
find_last_if_not libstdc++: Remove dg-options "-std=gnu++23" from remaining tests 2023-09-15 21:57:40 +01:00
fold_left libstdc++: Test for feature test macros more accurately 2023-11-16 08:06:59 +00:00
fold_right libstdc++: Remove dg-options "-std=gnu++23" from remaining tests 2023-09-15 21:57:40 +01:00
for_each Update copyright years. 2025-01-02 11:59:57 +01:00
generate Update copyright years. 2025-01-02 11:59:57 +01:00
generate_n Update copyright years. 2025-01-02 11:59:57 +01:00
headers libstdc++: add constexpr stable_partition 2025-03-27 13:47:30 +01:00
heap libstdc++: Fix algorithms to use iterators' difference_type for arithmetic [PR121890] 2025-09-12 21:46:48 +01:00
includes Update copyright years. 2025-01-02 11:59:57 +01:00
inplace_merge libstdc++: Directly implement ranges::inplace_merge [PR100795] 2025-06-27 13:53:26 -04:00
is_heap Update copyright years. 2025-01-02 11:59:57 +01:00
is_heap_until Update copyright years. 2025-01-02 11:59:57 +01:00
is_partitioned Update copyright years. 2025-01-02 11:59:57 +01:00
is_permutation libstdc++: fix a dangling reference crash in ranges::is_permutation [PR118160] 2025-02-07 14:53:30 +00:00
is_sorted Update copyright years. 2025-01-02 11:59:57 +01:00
is_sorted_until Update copyright years. 2025-01-02 11:59:57 +01:00
iter_swap Update copyright years. 2025-01-02 11:59:57 +01:00
lexicographical_compare libstdc++: Fix algorithms to use iterators' difference_type for arithmetic [PR121890] 2025-09-12 21:46:48 +01:00
lexicographical_compare_three_way Update copyright years. 2025-01-02 11:59:57 +01:00
lower_bound libstdc++: Tweak dg-error patterns for C++26 constexpr changes 2025-07-15 15:11:06 +01:00
make_heap Update copyright years. 2025-01-02 11:59:57 +01:00
max libstdc++: Add nodiscard attribute for ranges algorithm [PR121476] 2025-08-18 14:05:06 +02:00
max_element Update copyright years. 2025-01-02 11:59:57 +01:00
merge Update copyright years. 2025-01-02 11:59:57 +01:00
min libstdc++: Add nodiscard attribute for ranges algorithm [PR121476] 2025-08-18 14:05:06 +02:00
min_element Update copyright years. 2025-01-02 11:59:57 +01:00
minmax libstdc++: Fix VERIFY(idx = 1) bugs in tests 2025-09-27 21:17:40 +01:00
minmax_element libstdc++: Add nodiscard attribute for ranges algorithm [PR121476] 2025-08-18 14:05:06 +02:00
mismatch Update copyright years. 2025-01-02 11:59:57 +01:00
move libstdc++: Move new functions to separate files [PR119110] 2025-03-05 22:10:26 +00:00
move_backward libstdc++: Move new functions to separate files [PR119110] 2025-03-05 22:10:26 +00:00
next_permutation Update copyright years. 2025-01-02 11:59:57 +01:00
none_of Update copyright years. 2025-01-02 11:59:57 +01:00
nth_element libstdc++: Fix algorithms to use iterators' difference_type for arithmetic [PR121890] 2025-09-12 21:46:48 +01:00
partial_sort libstdc++: Fix algorithms to use iterators' difference_type for arithmetic [PR121890] 2025-09-12 21:46:48 +01:00
partial_sort_copy libstdc++: Fix algorithms to use iterators' difference_type for arithmetic [PR121890] 2025-09-12 21:46:48 +01:00
partition Update copyright years. 2025-01-02 11:59:57 +01:00
partition_copy Update copyright years. 2025-01-02 11:59:57 +01:00
partition_point Update copyright years. 2025-01-02 11:59:57 +01:00
pop_heap Update copyright years. 2025-01-02 11:59:57 +01:00
prev_permutation Update copyright years. 2025-01-02 11:59:57 +01:00
pstl Update copyright years. 2025-01-02 11:59:57 +01:00
push_heap Update copyright years. 2025-01-02 11:59:57 +01:00
random_shuffle Update copyright years. 2025-01-02 11:59:57 +01:00
remove Update copyright years. 2025-01-02 11:59:57 +01:00
remove_copy Update copyright years. 2025-01-02 11:59:57 +01:00
remove_copy_if Update copyright years. 2025-01-02 11:59:57 +01:00
remove_if libstdc++: Use ranges::iter_move in ranges::remove_if [PR120789] 2025-07-01 13:43:12 -04:00
replace Update copyright years. 2025-01-02 11:59:57 +01:00
replace_copy Update copyright years. 2025-01-02 11:59:57 +01:00
replace_copy_if Update copyright years. 2025-01-02 11:59:57 +01:00
replace_if Update copyright years. 2025-01-02 11:59:57 +01:00
reverse Update copyright years. 2025-01-02 11:59:57 +01:00
reverse_copy Update copyright years. 2025-01-02 11:59:57 +01:00
rotate libstdc++: ranges::rotate should use ranges::iter_move [PR121913] 2025-09-12 21:46:51 +01:00
rotate_copy Update copyright years. 2025-01-02 11:59:57 +01:00
sample libstdc++: Directly implement ranges::sample [PR100795] 2025-06-27 13:53:37 -04:00
search Update copyright years. 2025-01-02 11:59:57 +01:00
search_n Update copyright years. 2025-01-02 11:59:57 +01:00
set_difference Update copyright years. 2025-01-02 11:59:57 +01:00
set_intersection Update copyright years. 2025-01-02 11:59:57 +01:00
set_symmetric_difference Update copyright years. 2025-01-02 11:59:57 +01:00
set_union Update copyright years. 2025-01-02 11:59:57 +01:00
shift_left libstdc++: Implement ranges::shift_left/right from P2440R1 2025-07-06 14:49:34 -04:00
shift_right libstdc++: Implement ranges::shift_left/right from P2440R1 2025-07-06 14:49:34 -04:00
shuffle libstdc++: Fix ranges::shuffle for non-sized range [PR121917] 2025-09-13 10:44:12 -04:00
sort libstdc++: Directly implement ranges::sort [PR100795] 2025-06-27 13:53:06 -04:00
sort_heap Update copyright years. 2025-01-02 11:59:57 +01:00
stable_partition libstdc++: Directly implement ranges::stable_partition [PR100795] 2025-06-27 13:53:32 -04:00
stable_sort libstdc++: Directly implement ranges::stable_sort [PR100795] 2025-06-27 13:53:29 -04:00
starts_with libstdc++: Implement C++23 P1659R3 starts_with and ends_with 2025-06-04 10:29:47 -04:00
swap Update copyright years. 2025-01-02 11:59:57 +01:00
swap_ranges Update copyright years. 2025-01-02 11:59:57 +01:00
transform Update copyright years. 2025-01-02 11:59:57 +01:00
unique libstdc++: Use ranges::iter_move in ranges::unique [PR120789] 2025-07-01 13:43:09 -04:00
unique_copy libstdc++: Implement LWG 2439 for std::unique_copy [PR120386] 2025-06-02 18:20:28 +01:00
upper_bound libstdc++: Tweak dg-error patterns for C++26 constexpr changes 2025-07-15 15:11:06 +01:00
constexpr_macro.cc Update copyright years. 2025-01-02 11:59:57 +01:00
cpp_lib_constexpr.cc libstdc++: re-bump the feature-test macro for P2562R1 [PR119488] 2025-03-27 13:47:30 +01:00
default_template_value.cc c++: Delete defaulted operator <=> if std::strong_ordering::equal doesn't convert to its rettype [PR118387] 2025-01-15 08:59:46 +01:00