Quuxplusone / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
https://p1144.godbolt.org/z/jf67zx5hq
Other
1 stars 2 forks source link

Refactor container CTAD tests #12

Open Quuxplusone opened 1 year ago

Quuxplusone commented 1 year ago

[libc++] [test] Reformat deduct.pass.cpp for sequence containers

Also add a test for `vector(42, allocator<int>())` since it doesn't
do what you'd naturally think it does.

[libc++] [test] Rename deduct.fail.cpp -> deduct.verify.cpp, and reformat

All tests have been reformatted to 2-space indents and commented
in the modern style. Remove the repetition of Standardese deduction guides,
since the important thing about these verify tests is that they reject
the right things, not that they "exercise" specific signatures (which
by definition they will not, because the point is that no specific signature
matches, hence CTAD fails).

No code coverage was (intentionally) removed, but I tried to simplify the code where possible, and added coverage for vector(42, allocator<int>()) (and ditto for each of the containers) as mentioned above.