Skip to content

<algorithm>: randomized test coverage for std::search_n and ranges::search_n #933

@CaseyCarter

Description

@CaseyCarter

We've been bitten by bugs in the deceptively simple search_n algorithm in the past, and ranges::search_n makes some slightly different implementation choices from std::search_n. It would raise confidence in the correctness of those choices if we had a test that searched random strings of binary digits for sequences of 0s or 1s of randomly-chosen lengths and validated that ranges::search_n and std::search_n produce identical correct results.

(Such a randomized test must ensure reproducibility and could do so by following the model of tests/std/tests/P0067R5_charconv/test.cpp.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    fixedSomething works now, yay!testRelated to test code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions