Fixes https://github.com/llvm/llvm-project/issues/50060 .
Looking into this file gave me a wtf moment. So I rewrote this whole test so that it actually tests the stuff we're trying to test. For each subexpression of the concept, test what happens when it fails. Also, test some types that mimic weird standard types, such as std::locale (returns by const reference) and std::tuple-of-references.
Details
Details
- Reviewers
ldionne Mordante - Group Reviewers
Restricted Project - Commits
- rGd96a5042d69a: [libc++] [test] Improve the tests for std::assignable_from.
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
LGTM with nitpick comment.
libcxx/test/std/concepts/concepts.lang/concept.assignable/assignable_from.compile.pass.cpp | ||
---|---|---|
12–20 | We've never done it that way, and I don't think we should start now. | |
442 | Some of the complexity in this test comes from the fact that we're doing conformance testing for several standard types, which is something I had required when we first started working on concepts. In retrospect, I think the complexity/value tradeoff of these tests is not as high as I thought. |
We've never done it that way, and I don't think we should start now.