[all-commits] [llvm/llvm-project] a82193: [libc++][test] Refactor increasing_allocator (#115...

Peng Liu via All-commits all-commits at lists.llvm.org
Thu Dec 5 12:44:27 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a821937b6d29f874d2561c6ef073faeed302b1a9
      https://github.com/llvm/llvm-project/commit/a821937b6d29f874d2561c6ef073faeed302b1a9
  Author: Peng Liu <winner245 at hotmail.com>
  Date:   2024-12-05 (Thu, 05 Dec 2024)

  Changed paths:
    M libcxx/test/std/containers/sequences/vector.bool/shrink_to_fit.pass.cpp
    M libcxx/test/std/containers/sequences/vector/vector.capacity/shrink_to_fit.pass.cpp
    M libcxx/test/std/strings/basic.string/string.capacity/shrink_to_fit.pass.cpp
    A libcxx/test/support/increasing_allocator.h

  Log Message:
  -----------
  [libc++][test] Refactor increasing_allocator (#115671)

The increasing_allocator<T> class, originally introduced to test shrink_to_fit()
for std::vector, std::vector<bool>, and std::basic_string, has duplicated
definitions across several test files. Given the potential utility of this
class for capacity-related tests in various sequence containers, this patch
refactors the definition of increasing_allocator<T> into a single, reusable
location.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list