-
Notifications
You must be signed in to change notification settings - Fork 3
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
Feature/std23 repeat #42
Conversation
Also, include tests for int, float, and string view types
CHECK(RepeatedInt.size() == boundLimit); | ||
for (int i : RepeatedInt){ | ||
CHECK(i == repeated); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would like to see tests for the concepts that the view needs to satisfy:
CHECK( std20::ranges::viewable_range< Range > );
CHECK( std20::ranges::range< Range > );
CHECK( std20::ranges::view< Range > );
CHECK( std20::ranges::sized_range< Range > );
CHECK( std20::ranges::forward_range< Range > );
CHECK( std20::ranges::bidirectional_range< Range > );
CHECK( std20::ranges::random_access_range< Range > );
CHECK( ! std20::ranges::contiguous_range< Range > );
CHECK( std20::ranges::common_range< Range > );
and tests for the remainder of the view interface. like this:
CHECK( 5 == chunk.size() );
CHECK( false == chunk.empty() );
CHECK( true == bool( chunk ) );
CHECK( std20::ranges::equal( equal, chunk ) );
CHECK( equal[0] == chunk.front() );
CHECK( equal[4] == chunk.back() );
CHECK( 1 == chunk[0] );
CHECK( 3 == chunk[1] );
CHECK( 5 == chunk[2] );
CHECK( 7 == chunk[3] );
CHECK( 9 == chunk[4] );
All other views have tests like these to ensure the views function appropriately.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Random access issue is fixed with inclusion of >= and <= operators. Pushing this shortly.
Size Checks are already being done with bound limits with lines like
CHECK(RepeatedInt.size() == boundLimit);
and with unbound limits with
CHECK( std20::same_as<std::remove_cv_t<decltype(std20::unreachable_sentinel)>, decltype(RepeatedInt.end())>);
Adding to use case test an unbound example as well. Pushing shortly:
I added a use case in the use case test and it seems repeat is not a random access range. I believe it should be. |
Adding >= and <= operators to make repeat random access. Adding unbound float type test to use case test. Removing enabled borrow range
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The random access issue is fixed. I'll do a follow up to clean up and add the missing concept tests and view_interface function tests, as well as moving the zip and zip_transform out of production code. After that, we can look at releasing a new version and update ENDFtk.
No description provided.