[libcxx-commits] [PATCH] D145116: [libc++] Use ASSERT_SAME_TYPE instead of <type_traits> in depr tests

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Mar 1 13:46:20 PST 2023


ldionne created this revision.
Herald added a project: All.
ldionne requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.

Whenever, possible, use ASSERT_SAME_TYPE instead of static_assert along
with std::is_same in the depr header tests. This prevents dragging in
multiple headers unrelated to the header being tested, which can (and
has) hidden issues.

Also, add a couple of tests to ensure that basic declarations in
<stddef.h> and <stdint.h> are available when including just those
headers, since the rest of the tests for those types require pulling
in additional dependencies.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D145116

Files:
  libcxx/test/std/depr/depr.c.headers/ctype_h.pass.cpp
  libcxx/test/std/depr/depr.c.headers/fenv_h.compile.pass.cpp
  libcxx/test/std/depr/depr.c.headers/inttypes_h.compile.pass.cpp
  libcxx/test/std/depr/depr.c.headers/inttypes_h.pass.cpp
  libcxx/test/std/depr/depr.c.headers/locale_h.compile.pass.cpp
  libcxx/test/std/depr/depr.c.headers/math_h.pass.cpp
  libcxx/test/std/depr/depr.c.headers/setjmp_h.compile.pass.cpp
  libcxx/test/std/depr/depr.c.headers/signal_h.compile.pass.cpp
  libcxx/test/std/depr/depr.c.headers/stddef_h.compile.pass.cpp
  libcxx/test/std/depr/depr.c.headers/stddef_h.nullptr.pass.cpp
  libcxx/test/std/depr/depr.c.headers/stddef_h.pass.cpp
  libcxx/test/std/depr/depr.c.headers/stdint_h.pass.cpp
  libcxx/test/std/depr/depr.c.headers/stdio_h.compile.pass.cpp
  libcxx/test/std/depr/depr.c.headers/stdio_h.pass.cpp
  libcxx/test/std/depr/depr.c.headers/stdlib_h.pass.cpp
  libcxx/test/std/depr/depr.c.headers/string_h.pass.cpp
  libcxx/test/std/depr/depr.c.headers/time_h.compile.pass.cpp
  libcxx/test/std/depr/depr.c.headers/wctype_h.compile.pass.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D145116.501657.patch
Type: text/x-patch
Size: 114104 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230301/d1f7382e/attachment-0001.bin>


More information about the libcxx-commits mailing list