This is an archive of the discontinued LLVM Phabricator instance.

[libc++][test] Add test coverage for codecvt<char(16|32)_t, char8_t, mbstate_t>
ClosedPublic

Authored by CaseyCarter on Apr 21 2019, 10:56 AM.

Details

Summary

This change adds test coverage for the codecvt<char16_t, char8_t, mbstate_t> and codecvt<char32_t, char8_t, mbstate_t> ctype facets added to the C++20 WD by P0482R6. Note that libc++ does not implement these facets despite implementing the remainder of P0482, presumably for ABI reasons.

Diff Detail

Event Timeline

CaseyCarter created this revision.Apr 21 2019, 10:56 AM
CaseyCarter abandoned this revision.May 4 2020, 11:07 AM

We could merge this but mark it as unsupported in libc++?

Specifically, // UNSUPPORTED: libc++ with a comment that explains why. WDYT?

CaseyCarter edited the summary of this revision. (Show Details)
  • Guard tests for components that libc++ doesn't implement with // UNSUPPORTED: libc++ and an appropriate comment.
  • clang-format the things
  • utf_sanity_check.pass.cpp is a bit different since it tests both implemented and unimplemented components: I guarded the appropriate sections with !defined(_LIBCPP_VERSION).
ldionne accepted this revision.May 7 2020, 8:56 PM

Great!

This revision is now accepted and ready to land.May 7 2020, 8:56 PM

To be clear, I'm trying to move the test suite towards a generic conformance test suite for the Standard, as opposed to a libc++ test suite that happens to be usable by other Standard Libraries. This change highlights that philosophy.

CaseyCarter closed this revision.May 8 2020, 6:24 AM

To be clear, I'm trying to move the test suite towards a generic conformance test suite for the Standard, as opposed to a libc++ test suite that happens to be usable by other Standard Libraries. This change highlights that philosophy.

Excellent. I'll try to contribute more tests in the future.

This was merged as https://github.com/llvm/llvm-project/commit/197f185274567f56c8824a63cb2d8b1a0c76b29a. (I didn't notice until too late that I didn't have the Differential Revision in the commit log, so closing by hand like a barbarian.)