[all-commits] [llvm/llvm-project] 029c9c: [libc++] Refactor tests for std::pointer_traits (#...

Louis Dionne via All-commits all-commits at lists.llvm.org
Mon Sep 25 08:15:47 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 029c9c31769c26c53108aba7436d46f9ab63ed8d
      https://github.com/llvm/llvm-project/commit/029c9c31769c26c53108aba7436d46f9ab63ed8d
  Author: Louis Dionne <ldionne.2 at gmail.com>
  Date:   2023-09-25 (Mon, 25 Sep 2023)

  Changed paths:
    M libcxx/test/std/utilities/memory/pointer.traits/pointer.traits.functions/pointer_to.pass.cpp
    A libcxx/test/std/utilities/memory/pointer.traits/pointer.traits.types/difference_type.compile.pass.cpp
    R libcxx/test/std/utilities/memory/pointer.traits/pointer.traits.types/difference_type.pass.cpp
    A libcxx/test/std/utilities/memory/pointer.traits/pointer.traits.types/element_type.compile.pass.cpp
    R libcxx/test/std/utilities/memory/pointer.traits/pointer.traits.types/element_type.pass.cpp
    A libcxx/test/std/utilities/memory/pointer.traits/pointer.traits.types/lwg3545.compile.pass.cpp
    A libcxx/test/std/utilities/memory/pointer.traits/pointer.traits.types/pointer.compile.pass.cpp
    A libcxx/test/std/utilities/memory/pointer.traits/pointer.traits.types/rebind.compile.pass.cpp
    R libcxx/test/std/utilities/memory/pointer.traits/pointer.traits.types/rebind.pass.cpp
    R libcxx/test/std/utilities/memory/pointer.traits/pointer_to.pass.cpp
    A libcxx/test/std/utilities/memory/pointer.traits/ptr.pointer_to.pass.cpp
    A libcxx/test/std/utilities/memory/pointer.traits/ptr.types.compile.pass.cpp
    R libcxx/test/std/utilities/memory/pointer.traits/types.compile.pass.cpp

  Log Message:
  -----------
  [libc++] Refactor tests for std::pointer_traits (#66645)

After landing the implementation of LWG3545, I realized that the tests
for std::pointer_traits had become a bit disorganized. This patch is a
NFC that refactors the tests:
- Move compile-only tests to `.compile.pass.cpp` tests
- Re-create the clear distinction between tests for the std::pointer_traits base tempate and for the T* specialization.
- De-duplicate test coverage -- we had a bunch of things that were tested in duplication.




More information about the All-commits mailing list