[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
Loading
Please sign in to comment