Some tests in string.view.comparison are not enabled due to previous lack of
support for constexpr std::string. Now that it is implemented, we can enable
these tests.
Details
- Reviewers
philnik var-const ldionne Mordante - Group Reviewers
Restricted Project - Commits
- rG93a375a15c8a: [libc++][test] Enable constexpr string comparison tests
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Event Timeline
@philnik I'm not sure there's actually anything to do here - do you see anything? We do need the TEST_IS_CONSTANT_EVALUATED check so the test won't run in C++14 or C++17 modes for example. So, I think top of tree is fine as-is, unless I'm missing something.
libcxx/test/std/strings/string.view/string.view.comparison/equal.pass.cpp | ||
---|---|---|
10 | I don't think so, since we backport string_view all the way back to C++03 as an extension. |
LGTM assuming CI passes. It would be nice if you could disable the tests for other standard libraries pre-C++17.
libcxx/test/std/strings/string.view/string.view.comparison/equal.pass.cpp | ||
---|---|---|
10 | Sorry, my comment was a bit unclear: It should only be enabled for libc++ pre-C++17. i.e. not for libstdc++, MSVC STL etc. I'm not 100% sure, but I think // UNSUPPORTED: !stdlib=libc++ && (c++03 || c++11 || c++14) should work. |
libcxx/test/std/strings/string.view/string.view.comparison/equal.pass.cpp | ||
---|---|---|
10 | I see. Yeah, I agree with that. That's a pre-existing thing though and I'd recommend we do that for all of the string_view tests. I'm happy to volunteer to do that as a follow-up if that works for you. |
The ranges::transform test timeouts are normal. You can consider the CI passed.
libcxx/test/std/strings/string.view/string.view.comparison/equal.pass.cpp | ||
---|---|---|
10 | Ok yeah. If they are missing for all tests it should probably be done in a separate PR. |
Nice catch! LGTM! It seems the build errors are time-out and they don't seem to be related to your changes.
Pre-existing: These tests should only be enabled for libc++ pre-C++17.