[libcxx-commits] [libcxx] c7cecd8 - [libc++] Fix assign_range test for forward_list (#208283)
via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Jul 9 09:47:15 PDT 2026
Author: Louis Dionne
Date: 2026-07-09T12:47:10-04:00
New Revision: c7cecd8351ca1d50fca0f8526c7701e8de3fe23a
URL: https://github.com/llvm/llvm-project/commit/c7cecd8351ca1d50fca0f8526c7701e8de3fe23a
DIFF: https://github.com/llvm/llvm-project/commit/c7cecd8351ca1d50fca0f8526c7701e8de3fe23a.diff
LOG: [libc++] Fix assign_range test for forward_list (#208283)
That test was checking prepend_range instead of assign_range due to a
copy-paste error.
Fixes #74536
Added:
Modified:
libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/assign_range.pass.cpp
Removed:
################################################################################
diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/assign_range.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/assign_range.pass.cpp
index 9a3adec1d9756..61500b58757cb 100644
--- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/assign_range.pass.cpp
+++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/assign_range.pass.cpp
@@ -9,7 +9,7 @@
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
// template<container-compatible-range<T> R>
-// constexpr void prepend_range(R&& rg); // C++23; constexpr since C++26
+// constexpr void assign_range(R&& rg); // C++23; constexpr since C++26
#include <forward_list>
@@ -17,23 +17,23 @@
#include "test_macros.h"
// Tested cases:
-// -
diff erent kinds of insertions (prepending an {empty/one-element/mid-sized/long range} into an
+// -
diff erent kinds of assignments (assigning an {empty/one-element/mid-sized/long range} to an
// {empty/one-element/full} container);
-// - prepending move-only elements;
+// - assigning move-only elements;
// - an exception is thrown when copying the elements or when allocating new elements.
TEST_CONSTEXPR_CXX26 bool test() {
static_assert(test_constraints_assign_range<std::forward_list, int, double>());
for_all_iterators_and_allocators<int, const int*>([]<class Iter, class Sent, class Alloc>() {
- test_sequence_prepend_range<std::forward_list<int, Alloc>, Iter, Sent>([](auto&&) {
+ test_sequence_assign_range<std::forward_list<int, Alloc>, Iter, Sent>([](auto&&) {
// No additional validation to do.
});
});
- test_sequence_prepend_range_move_only<std::forward_list>();
+ test_sequence_assign_range_move_only<std::forward_list>();
if (!TEST_IS_CONSTANT_EVALUATED) {
- test_prepend_range_exception_safety_throwing_copy<std::forward_list>();
- test_prepend_range_exception_safety_throwing_allocator<std::forward_list, int>();
+ test_assign_range_exception_safety_throwing_copy<std::forward_list>();
+ test_assign_range_exception_safety_throwing_allocator<std::forward_list, int>();
}
return true;
More information about the libcxx-commits
mailing list