Skip to content

Commit 8f73e67

Browse files
committed
Assert that sorting leaves the data sorted
1 parent df9b374 commit 8f73e67

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

source/containers/test/sort/sort_benchmark.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
// http://www.boost.org/LICENSE_1_0.txt)
55

66
#include <benchmark/benchmark.h>
7+
#include <bounded/assert.hpp>
78

89
import containers.algorithms.sort.chunked_insertion_sort;
910

@@ -49,6 +50,7 @@ auto benchmark_sort(benchmark::State & state) -> void {
4950
benchmark::DoNotOptimize(container);
5051
benchmark::ClobberMemory();
5152
function(container);
53+
BOUNDED_ASSERT(containers::is_sorted(container));
5254
benchmark::DoNotOptimize(container);
5355
benchmark::ClobberMemory();
5456
}

0 commit comments

Comments
 (0)