-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tests: Add unit tests for repeated_chars_iterator #29
tests: Add unit tests for repeated_chars_iterator #29
Conversation
f9a47b7
to
d4c8b5e
Compare
Could these tests be made constexpr with static_assert? |
constexpr can involve different code paths in the implementation, so the tests should generally be both consteval and runtime. I think? I'm still working out understanding of constexpr testing and testing constexpr code. |
I would also add tests for concepts like in https://github.com/beman-project/optional26/blob/main/src/beman/optional26/tests/detail/iterator.t.cpp |
@steve-downey , is the same solution that we already have in this file in optional26? Is there any other "better" utility? |
d4c8b5e
to
d630b4d
Compare
Looking at that, I'm not 100% sure that's actually consteval? That macro looks like it would work in a constexpr context, but it would also work at runtime? Failing to compile is a draconian error and we don't get any other test results. |
Link this PR against #5 |
Added two more unit tests to the suite:
std::next
function on a beman iteratorstd::distance
function on a beman iterator