[libc++] Tests that could be `.compile.pass` but are instead `.pass`
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
I've noticed that some libc++ tests are `.pass.cpp` even though they don't do anything in their main function and could be `.compile.pass.cpp`.
Some examples are:
- [`libcxx/test/libcxx/atomics/atomics.order/memory_order.underlying_type.pass.cpp`](https://github.com/llvm/llvm-project/blob/8042e61d6ae99347e8cab040b324b33cabfb1d4a/libcxx/test/libcxx/atomics/atomics.order/memory_order.underlying_type.pass.cpp)
- [`libcxx/test/libcxx/numerics/c.math/constexpr-fns.pass.cpp`](https://github.com/llvm/llvm-project/blob/8042e61d6ae99347e8cab040b324b33cabfb1d4a/libcxx/test/libcxx/numerics/c.math/constexpr-fns.pass.cpp)
- [`libcxx/test/libcxx/type_traits/is_implicitly_default_constructible.pass.cpp`](https://github.com/llvm/llvm-project/blob/8042e61d6ae99347e8cab040b324b33cabfb1d4a/libcxx/test/libcxx/type_traits/is_implicitly_default_constructible.pass.cpp)
- [`libcxx/test/libcxx/utilities/meta/meta_base.pass.cpp`](https://github.com/llvm/llvm-project/blob/8042e61d6ae99347e8cab040b324b33cabfb1d4a/libcxx/test/libcxx/utilities/meta/meta_base.pass.cpp)
For full disclosure, I found these by asking Claude Code, although I have manually verified each instance looks like it could be a `.compile.pass.cpp` test.
Is it worth fixing these and others like them, as a batch? They're technically bad in the sense that they slow down the testing time slightly and have the potential to mislead people into copying them, in violation of the the [testing guidelines](https://libcxx.llvm.org/TestingLibcxx.html). But reviewing such a change would use up reviewer time, so I thought I should check.
Contributor guide
Research direction
Start with the four listed files under libcxx/test and read the libc++ testing guidelines on `.compile.pass.cpp` tests. Check whether each test's main function performs no runtime work, then identify comparable cases and rename only the qualifying tests. Verify the affected libc++ tests after the batch change.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- testing-qa
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100