Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
fuzz_sort.cc File Reference

Compare Aleph sorting and indirect sorting with standard references. More...

#include <algorithm>
#include <cstddef>
#include <cstdint>
#include <cstdlib>
#include <functional>
#include <numeric>
#include <vector>
#include <ahSort.H>
Include dependency graph for fuzz_sort.cc:

Go to the source code of this file.

Functions

int LLVMFuzzerTestOneInput (const uint8_t *data, size_t size)
 Check sorted values and stable index order for a byte sequence.
 

Detailed Description

Compare Aleph sorting and indirect sorting with standard references.

Definition in file fuzz_sort.cc.

Function Documentation

◆ LLVMFuzzerTestOneInput()

int LLVMFuzzerTestOneInput ( const uint8_t *  data,
size_t  size 
)

Check sorted values and stable index order for a byte sequence.

Parameters
dataFuzzer-generated values.
sizeNumber of available bytes.
Returns
Zero when all Aleph results match the references.
Note
Uses at most 256 values; duplicate-heavy values test stability.

Definition at line 52 of file fuzz_sort.cc.

References Aleph::DynArray< T >::append(), Aleph::count(), Aleph::in_place_sort(), Aleph::DynArray< T >::reserve(), Aleph::DynArray< T >::size(), Aleph::size(), Aleph::sort(), Aleph::stable_argsort(), and value.