This is an archive of the discontinued LLVM Phabricator instance.

[libc++] Move all the remaining .fail.cpp tests to .verify.cpp
ClosedPublic

Authored by ldionne on Jun 28 2023, 7:40 AM.

Details

Summary

I made sure they all had some expected-error output in them. Many of
these tests would be better implemented as a positive test using SFINAE,
but this is beyond the scope of this patch.

Diff Detail

Event Timeline

ldionne created this revision.Jun 28 2023, 7:40 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 28 2023, 7:40 AM
Herald added a subscriber: wenlei. · View Herald Transcript
ldionne requested review of this revision.Jun 28 2023, 7:40 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 28 2023, 7:40 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript
ldionne updated this revision to Diff 535407.Jun 28 2023, 7:50 AM

Fix test that would be broken by a file renaming.

ldionne added inline comments.Jun 28 2023, 7:56 AM
libcxx/test/std/utilities/intseq/intseq.make/make_integer_seq.verify.cpp
12

This is one of the only two tests I actually had to change instead of just blindly renaming.

libcxx/test/std/utilities/intseq/intseq.make/make_integer_seq_fallback.verify.cpp
12

This is the second one. Everything else is just renaming.

Mordante accepted this revision.Jun 28 2023, 8:17 AM
Mordante added a subscriber: Mordante.

I only checked the called out tests. LGTM but I have a question.

libcxx/test/std/utilities/intseq/intseq.make/make_integer_seq.verify.cpp
27

Why is it safe to remove the !defined(_LIBCPP_TESTING_FALLBACK_MAKE_INTEGER_SEQUENCE) part?

This revision is now accepted and ready to land.Jun 28 2023, 8:17 AM
ldionne marked an inline comment as done.Jun 29 2023, 1:54 PM
ldionne added inline comments.
libcxx/test/std/utilities/intseq/intseq.make/make_integer_seq.verify.cpp
27

We used to only define it from the other sibling test, and then we'd #include the sources for this test. Now both tests are "standalone", i.e. they don't include each other so this test (which doesn't test the fallback) doesn't need to check for _LIBCPP_TESTING_FALLBACK_MAKE_INTEGER_SEQUENCE.

ldionne updated this revision to Diff 535989.Jun 29 2023, 1:58 PM
ldionne marked an inline comment as done.
ldionne retitled this revision from [libc++][NFC] Move all the remaining .fail.cpp tests to .verify.cpp to [libc++] Move all the remaining .fail.cpp tests to .verify.cpp.

Fix modular CI issue by using ADDITIONAL_COMPILE_FLAGS instead of #define in TU.

libcxx/test/std/utilities/variant/variant.variant/variant_empty.verify.cpp