Skip to content

Conversation

@CaseyCarter
Copy link
Contributor

@CaseyCarter CaseyCarter commented Jul 1, 2020

  • Replace base member of test::iterator and test::sentinel with peek. The point is to break the abstraction and provide access to the internal pointer. There's no reason to mimic the behavior of iterator/sentinel adaptors, it just makes the test tool harder to use.

  • test::range::begin enforces the restriction that it may be called at most once for a single-pass range. test::range::_Unchecked_begin should be subject to the same restriction.

  • Remove default template arguments for the element types of ranges in the instantiation helpers (test_in, test_fwd_fwd, etc.) forcing the element types to be explicitly specified.

@CaseyCarter CaseyCarter added the test Related to test code label Jul 1, 2020
@CaseyCarter CaseyCarter requested a review from a team as a code owner July 1, 2020 17:26
@CaseyCarter CaseyCarter changed the title Replace "base" member of test::iterator and test::sentinel with "peek" Updates to Ranges test machinery Jul 1, 2020
@miscco
Copy link
Contributor

miscco commented Jul 1, 2020

This manages to both look great and create a terrible headache for all the coming merge conflicts

@CaseyCarter
Copy link
Contributor Author

This manages to both look great and create a terrible headache for all the coming merge conflicts

@StephanTLavavej has been calling me "Merge Conflict" for years now.

@StephanTLavavej
Copy link
Member

Back when @BillyONeal and @CaseyCarter were in the same office, and were constantly submitting PRs with merge conflicts against each other, I placed a sticky note over their office nameplate, dubbing them Billy "Merge" O'Neal and Casey "Conflict" Carter. 😹

@StephanTLavavej StephanTLavavej removed their assignment Jul 1, 2020
@miscco miscco mentioned this pull request Jul 2, 2020
* The point is to break the abstraction and provide access to the internal pointer. There's no reason to mimic the behavior of iterator/sentinel adaptors, it just makes the test tool harder to use.

* Enforce that `begin` is called at most once in `test::range::_Unchecked_begin`

* Remove default arguments to the `test_meow` functions in `<range_algorithm_support.hpp>`.
@StephanTLavavej StephanTLavavej self-assigned this Jul 2, 2020
@StephanTLavavej StephanTLavavej merged commit 43851a5 into microsoft:master Jul 3, 2020
@StephanTLavavej
Copy link
Member

Thanks for making it easier to test ranges!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ranges C++20/23 ranges test Related to test code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants