Skip to content

Commit

Permalink
Update libcxx/vector
Browse files Browse the repository at this point in the history
  • Loading branch information
morzhovets committed Feb 4, 2025
1 parent a36757d commit fb59ed7
Show file tree
Hide file tree
Showing 5 changed files with 898 additions and 2 deletions.
18 changes: 18 additions & 0 deletions test/sources/libcxx/VectorTests.h
Original file line number Diff line number Diff line change
Expand Up @@ -146,14 +146,32 @@ LIBCXX_TEST_BEGIN(capacity_resize_size)
#include "vector/vector.capacity/resize_size.pass.cpp"
LIBCXX_TEST_END

#ifndef LIBCXX_TEST_SEGMENTED_ARRAY
LIBCXX_TEST_BEGIN(capacity_resize_size_exceptions)
#include "vector/vector.capacity/resize_size_exceptions.pass.cpp"
LIBCXX_TEST_END
#endif

LIBCXX_TEST_BEGIN(capacity_resize_size_value)
#include "vector/vector.capacity/resize_size_value.pass.cpp"
LIBCXX_TEST_END

#ifndef LIBCXX_TEST_SEGMENTED_ARRAY
LIBCXX_TEST_BEGIN(capacity_resize_size_value_exceptions)
#include "vector/vector.capacity/resize_size_value_exceptions.pass.cpp"
LIBCXX_TEST_END
#endif

LIBCXX_TEST_BEGIN(capacity_shrink_to_fit)
#include "vector/vector.capacity/shrink_to_fit.pass.cpp"
LIBCXX_TEST_END

#ifndef LIBCXX_TEST_SEGMENTED_ARRAY
LIBCXX_TEST_BEGIN(capacity_shrink_to_fit_exceptions)
#include "vector/vector.capacity/shrink_to_fit_exceptions.pass.cpp"
LIBCXX_TEST_END
#endif

LIBCXX_TEST_BEGIN(capacity_size)
#include "vector/vector.capacity/size.pass.cpp"
LIBCXX_TEST_END
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,7 @@ void test_copy_ctor_exception_for_strong_guarantee(std::vector<throwing_data<T>,
for (std::size_t i = 0; i < values.size(); ++i)
v.emplace_back(values[i], throw_after);

#ifndef LIBCXX_TEST_SEGMENTED_ARRAY
throwing_data<T>* old_data = v.data();
#endif
std::size_t old_size = v.size();
std::size_t old_cap = v.capacity();
std::size_t new_cap = 2 * old_cap;
Expand Down
Loading

0 comments on commit fb59ed7

Please sign in to comment.