llvm-project/libcxx/test/support
Louis Dionne f6fd1c1438 [libc++] Overhaul all tests for assertions and debug mode
Prior to this patch, there was no distinction between tests that check
basic assertions and tests that check full-fledged iterator debugging
assertions. Both were disabled when support for the debug mode is not
provided in the dylib, which is stronger than it needs to be.

Furthermore, all of the tests using "debug_macros.h" that contain more
than one assertion in them were broken -- any code after the first
assertion would never be executed.

This patch refactors all of our assertion-related tests to:
1. Be enabled whenever they can, i.e. basic assertions tests are run
   even when the debug mode is disabled.
2. Use the superior `check_assertion.h` (previously `debug_mode_helper.h`)
   instead of `debug_macros.h`, which allows multiple assertions in the
   same program.
3. Coalesce some tests into the same file to make them more readable.
4. Use consistent naming for test files -- no more db{1,2,3,...,10} tests.

This is a large but mostly mechanical patch.

Differential Revision: https://reviews.llvm.org/D121462
2022-03-15 10:56:34 -04:00
..
test.support [libc++][nfc] Add TEST_HAS_NO_UNICODE_CHARS. 2022-02-03 08:02:25 +01:00
test.workarounds [libcxx][test] compiler options are non-portable 2022-01-18 11:34:57 -08:00
type_classification [libcxx][nfc] Global `constexpr friend` -> `friend constexpr`. 2021-07-23 09:08:50 -07:00
Counter.h
DefaultOnly.h [libc++] NFC: Normalize `#endif //` comment indentation 2021-04-20 12:03:32 -04:00
MoveOnly.h [libc++][test] Clean up libcxx/test/support/MoveOnly.h 2022-01-29 18:20:46 -05:00
allocators.h [libcxx][test][NFC] Various tests for std::vector 2021-12-02 02:11:45 +03:00
almost_satisfies_types.h [libc++][ranges] Implement ranges::find{, _if, _if_not} 2022-03-12 01:46:02 +01:00
any_helpers.h [libc++][NFC] Remove uses of 'using namespace std;' in the test suite 2021-09-03 13:15:10 -04:00
archetypes.h [libcxx][test] compiler options are non-portable 2022-01-18 11:34:57 -08:00
archetypes.ipp
asan_testing.h [libc++] NFC: Normalize `#endif //` comment indentation 2021-04-20 12:03:32 -04:00
atomic_helpers.h [libc++][nfc] Add TEST_HAS_NO_UNICODE_CHARS. 2022-02-03 08:02:25 +01:00
callable_types.h [libc++] Add bind_front function (P0356R5). 2021-03-02 16:18:06 -08:00
charconv_test_helpers.h [libcxx][test] compiler options are non-portable 2022-01-18 11:34:57 -08:00
check_assertion.h [libc++] Overhaul all tests for assertions and debug mode 2022-03-15 10:56:34 -04:00
cmpxchg_loop.h Update atomic feature macros, synopsis, signatures to match C++20. Improve test coverage for non-lock-free atomics. 2020-09-09 10:00:09 -07:00
compare_types.h [libc++] Remove random [[nodiscard]] in the test suite 2021-07-12 12:45:21 -04:00
constexpr_char_traits.h [libc++] [test] Remove filenames from copyright headers. NFCI. 2021-10-01 12:14:00 -04:00
container_debug_tests.h [libc++] Overhaul all tests for assertions and debug mode 2022-03-15 10:56:34 -04:00
container_test_types.h [libc++] s/insertible/insertable/g. NFCI. 2020-12-14 09:54:58 -05:00
controlled_allocators.h [libc++] Remove uses of printf in some test support headers 2021-11-22 12:01:18 -05:00
count_new.h [libcxx][test] compiler options are non-portable 2022-01-18 11:34:57 -08:00
counting_predicates.h
deduction_guides_sfinae_checks.h [libc++] P0433R2: test that deduction guides are properly SFINAEd away. 2021-11-09 09:32:24 -08:00
deleter_types.h [libc++] Value-initialize unique_ptr's deleter_type 2021-11-24 17:31:34 -05:00
emplace_constructible.h [libc++] Make some testing utilities constexpr 2020-09-02 10:05:44 -04:00
experimental_any_helpers.h [libc++] Fix failures when running the test suite without RTTI 2020-09-21 20:17:24 -04:00
external_threads.cpp
filesystem_include.h
filesystem_test_helper.h [libcxx] [test] Make filesystem tests not rely on libc++ internals 2022-03-02 10:39:14 +02:00
format_string.h
fp_compare.h
hexfloat.h
indirectly_readable.h [libc++] Add all indirect callable concepts and projected 2021-05-28 10:10:44 -04:00
is_transparent.h [libc++] [P0919] Some belated review on D87171. 2021-09-20 14:46:38 -04:00
iterator_traits_cpp17_iterators.h [libcxx] makes `iterator_traits` C++20-aware 2021-04-20 11:30:08 -04:00
locale_helpers.h [libcxx] [test] Fix get_string_en_US, get_long_double_en_US for Windows 2022-03-04 10:18:07 +02:00
make_implicit.h [libc++] [P0935] [C++20] Eradicating unnecessarily explicit default constructors from the standard library. 2021-01-19 08:22:06 +01:00
make_string.h [libc++] [test] C++03-friendly MAKE_STRING macro. 2021-12-01 15:02:53 -05:00
make_test_thread.h [libc++] Introduce an indirection to create threads in the test suite 2020-11-27 11:54:19 -05:00
min_allocator.h [libc++] [test] Update "test_compare.h" users to avoid removed-in-C++20 members. NFCI. 2021-05-29 16:54:24 -04:00
msvc_stdlib_force_include.h [libcxx][test] Update msvc_stdlib_force_include.h for C++23 2022-02-20 11:35:33 -08:00
nasty_containers.h [libc++] [test] Constexpr-ify a couple of insert-iterator tests. 2021-05-28 15:15:50 -04:00
operator_hijacker.h [libc++] Use addressof in assignment operator. 2021-10-07 18:10:47 +02:00
parse_integer.h [libc++] NFC: Normalize `#endif //` comment indentation 2021-04-20 12:03:32 -04:00
platform_support.h [libcxx] [test] Use proper UTF-8 locales on Windows 2022-02-18 00:02:34 +02:00
pointer_comparison_test_helper.h [libcxx][nfc] Add license to `pointer_comparison_test_helper.h` 2021-04-23 12:37:47 -07:00
poisoned_hash_helper.h [libc++] LWG2148, LWG2543: Enable std::hash<Enum> in C++03 and C++11. 2022-02-16 11:01:49 -05:00
private_constructor.h [libc++] Remove unnecessary usage of <iostream> in the test suite 2020-10-02 13:00:34 -04:00
propagate_const_helpers.h
propagate_value_category.hpp [libc++] Fix tuple assignment from types derived from a tuple-like 2021-02-22 14:52:18 -05:00
rapid-cxx-test.h
read_write.h [libc++] Re-apply `std::indirectly_readable` and `std::indirectly_writable` 2021-04-22 11:24:04 -04:00
set_windows_crt_report_mode.h
template_cost_testing.h
test_allocator.h [libc++] Make test_allocator constexpr-friendly for constexpr string/vector 2021-11-07 16:15:28 +01:00
test_basic_format_arg.h [libc++][format] Add __format_arg_store. 2021-09-01 19:45:02 +02:00
test_comparisons.h [libcxx][test][NFC] More tests for containers comparisons 2021-11-03 16:15:10 +03:00
test_constexpr_container.h [libcxx][test] Add missing includes and suppress warnings 2022-01-13 17:34:04 -08:00
test_convertible.h
test_format_context.h [libc++][format] Add __format_arg_store. 2021-09-01 19:45:02 +02:00
test_iterators.h [libc++] Replace _LIBCPP_HAS_NO_CONCEPTS with _LIBCPP_STD_VER > 17. NFCI. 2022-03-13 12:32:06 -04:00
test_macros.h [libcxx][test] Let the library indicate support for int128 2022-02-17 14:07:49 -08:00
test_memory_resource.h
test_range.h [libc++] Replace _LIBCPP_HAS_NO_CONCEPTS with _LIBCPP_STD_VER > 17. NFCI. 2022-03-13 12:32:06 -04:00
test_transparent_unordered.h [libc++] [P0919] Some belated review on D87171. 2021-09-20 14:46:38 -04:00
test_workarounds.h [libcxx][test] compiler options are non-portable 2022-01-18 11:34:57 -08:00
truncate_fp.h
type_id.h [libc++] Remove uses of printf in some test support headers 2021-11-22 12:01:18 -05:00
unique_ptr_test_helper.h [libc++] NFC: Fix several GCC warnings in the test suite 2020-10-30 12:48:05 -04:00
user_defined_integral.h
uses_alloc_types.h [libc++] Remove uses of printf in some test support headers 2021-11-22 12:01:18 -05:00
variant_test_helpers.h [libc++] Implement P0655R1 visit<R>: Explicit Return Type for visit 2021-01-25 11:14:45 -05:00