valFuzz 1.2.0
Loading...
Searching...
No Matches
fuzz.hpp File Reference
#include <algorithm>
#include <atomic>
#include <deque>
#include <fstream>
#include <functional>
#include <iostream>
#include <mutex>
#include <optional>
#include <random>
#include <string>
#include <thread>
#include <tuple>
#include <valfuzz/common.hpp>

Go to the source code of this file.

Namespaces

namespace  valfuzz
 

Macros

#define MAX_RANDOM_STRING_LEN   1024
 
#define FUZZME(fun_name, pretty_name)
 

Typedefs

typedef std::function< void(std::string)> valfuzz::fuzz_function
 
typedef std::pair< std::string, fuzz_functionvalfuzz::fuzz_pair
 

Functions

template<typename T >
valfuzz::get_random ()
 
std::deque< fuzz_pair > & valfuzz::get_fuzzs ()
 
long unsigned int valfuzz::get_num_fuzz_tests ()
 
std::atomic< long unsigned int > & valfuzz::get_iterations ()
 
std::mt19937 & valfuzz::get_random_engine ()
 
std::uniform_real_distribution & valfuzz::get_uniform_distribution ()
 
void valfuzz::increment_iterations ()
 
std::optional< fuzz_pairvalfuzz::pop_fuzz_or_null ()
 
void valfuzz::add_fuzz_test (const std::string &name, fuzz_function test)
 
void valfuzz::run_one_fuzz (const std::string &name)
 
void valfuzz::_run_fuzz_tests ()
 
void valfuzz::run_fuzz_tests ()
 

Macro Definition Documentation

◆ FUZZME

#define FUZZME ( fun_name,
pretty_name )
Value:
void fun_name([[maybe_unused]] const std::string &test_name); \
static struct fun_name##_register \
{ \
fun_name##_register() \
{ \
valfuzz::add_fuzz_test(pretty_name, fun_name); \
} \
} fun_name##_register_instance; \
void fun_name([[maybe_unused]] const std::string &test_name)

Definition at line 31 of file fuzz.hpp.

◆ MAX_RANDOM_STRING_LEN

#define MAX_RANDOM_STRING_LEN   1024

Definition at line 27 of file fuzz.hpp.