File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 22 * Copyright (c) 2016-2025 Morwenn
33 * SPDX-License-Identifier: MIT
44 */
5+ #include < algorithm>
56#include < forward_list>
67#include < vector>
78#include < catch2/catch_test_macros.hpp>
9+ #include < rapidcheck.h>
10+ #include < rapidcheck/catch.h>
811#include < cpp-sort/probes/osc.h>
912#include < cpp-sort/utility/size.h>
1013#include < testing-tools/internal_compare.h>
@@ -63,4 +66,10 @@ TEST_CASE( "measure of disorder: osc", "[probe][osc]" )
6366 };
6467 CHECK ( osc (vec, comp, &wrapper::value) == 17 );
6568 }
69+
70+ rc::prop (" Osc(Reversed(X)) = Osc(X)" , [](std::vector<int > sequence) {
71+ auto osc_x = cppsort::probe::osc (sequence);
72+ std::reverse (sequence.begin (), sequence.end ());
73+ return cppsort::probe::osc (sequence) == osc_x;
74+ });
6675}
You can’t perform that action at this time.
0 commit comments