Marshall Clow | 29ae2ba | 2017-10-04 22:23:03 +0000 | [diff] [blame^] | 1 | // -*- C++ -*- |
| 2 | //===-------------------------- fuzzing.h --------------------------------===// |
| 3 | // |
| 4 | // The LLVM Compiler Infrastructure |
| 5 | // |
| 6 | // This file is dual licensed under the MIT and the University of Illinois Open |
| 7 | // Source Licenses. See LICENSE.TXT for details. |
| 8 | // |
| 9 | //===----------------------------------------------------------------------===// |
| 10 | |
| 11 | #ifndef _LIBCPP_FUZZING |
| 12 | #define _LIBCPP_FUZZING |
| 13 | |
| 14 | #include <cstddef> // for size_t |
| 15 | #include <cstdint> // for uint8_t |
| 16 | |
| 17 | namespace fuzzing { |
| 18 | |
| 19 | // These all return 0 on success; != 0 on failure |
| 20 | int sort (const uint8_t *data, size_t size); |
| 21 | int stable_sort (const uint8_t *data, size_t size); |
| 22 | int partition (const uint8_t *data, size_t size); |
| 23 | int stable_partition (const uint8_t *data, size_t size); |
| 24 | |
| 25 | // partition and stable_partition take Bi-Di iterators. |
| 26 | // Should test those, too |
| 27 | |
| 28 | int nth_element (const uint8_t *data, size_t size); |
| 29 | int partial_sort (const uint8_t *data, size_t size); |
| 30 | |
| 31 | } // namespace fuzzing |
| 32 | |
| 33 | #endif // _LIBCPP_FUZZING |