#include <algorithm>
#include <any>
#include <atomic>
#include <cstdlib>
#include <ctime>
#include <deque>
#include <functional>
#include <iostream>
#include <limits>
#include <mutex>
#include <optional>
#include <print>
#include <string>
#include <thread>
#include <tuple>
#include <type_traits>
#include <typeinfo>
#include <utility>
#include <vector>
Go to the source code of this file.
◆ AFTER
Value: void after(); \
static struct after##_register \
{ \
after##_register() \
{ \
valfuzz::set_function_execute_after(after); \
} \
} after##_register_instance; \
void after()
Definition at line 210 of file valfuzz.hpp.
◆ ASSERT
Value: if (!(cond)) \
{ \
std::cerr << "test: " << test_name << ", line: " << __LINE__ << ", "; \
std::cerr << "Assertion failed: " << #cond << std::endl; \
}
std::mutex & get_stream_mutex()
Definition at line 54 of file valfuzz.hpp.
◆ ASSERT_EQ
#define ASSERT_EQ |
( |
| a, |
|
|
| b ) |
Value: if ((a) != (b)) \
{ \
std::cerr << "test: " << test_name << ", line: " << __LINE__ << ", "; \
std::cerr << "Assertion failed: " << #a << " != " << #b << std::endl; \
}
Definition at line 62 of file valfuzz.hpp.
◆ ASSERT_GE
#define ASSERT_GE |
( |
| a, |
|
|
| b ) |
Value: if ((a) < (b)) \
{ \
std::cerr << "test: " << test_name << ", line: " << __LINE__ << ", "; \
std::cerr << "Assertion failed: " << #a << " >= " << #b << std::endl; \
}
Definition at line 102 of file valfuzz.hpp.
◆ ASSERT_GT
#define ASSERT_GT |
( |
| a, |
|
|
| b ) |
Value: if ((a) <= (b)) \
{ \
std::cerr << "test: " << test_name << ", line: " << __LINE__ << ", "; \
std::cerr << "Assertion failed: " << #a << " > " << #b << std::endl; \
}
Definition at line 94 of file valfuzz.hpp.
◆ ASSERT_LE
#define ASSERT_LE |
( |
| a, |
|
|
| b ) |
Value: if ((a) > (b)) \
{ \
std::cerr << "test: " << test_name << ", line: " << __LINE__ << ", "; \
std::cerr << "Assertion failed: " << #a << " <= " << #b << std::endl; \
}
Definition at line 86 of file valfuzz.hpp.
◆ ASSERT_LT
#define ASSERT_LT |
( |
| a, |
|
|
| b ) |
Value: if ((a) >= (b)) \
{ \
std::cerr << "test: " << test_name << ", line: " << __LINE__ << ", "; \
std::cerr << "Assertion failed: " << #a << " < " << #b << std::endl; \
}
Definition at line 78 of file valfuzz.hpp.
◆ ASSERT_NE
#define ASSERT_NE |
( |
| a, |
|
|
| b ) |
Value: if ((a) == (b)) \
{ \
std::cerr << "test: " << test_name << ", line: " << __LINE__ << ", "; \
std::cerr << "Assertion failed: " << #a << " == " << #b << std::endl; \
}
Definition at line 70 of file valfuzz.hpp.
◆ ASSERT_NO_THROW
#define ASSERT_NO_THROW |
( |
| expr | ) |
|
Value: { \
try \
{ \
expr; \
} \
catch (...) \
{ \
std::cerr << "test: " << test_name << ", line: " << __LINE__ \
<< ", "; \
std::cerr << "Exception thrown" << std::endl; \
} \
}
Definition at line 130 of file valfuzz.hpp.
◆ ASSERT_THROW
#define ASSERT_THROW |
( |
| expr, |
|
|
| exception ) |
Value: { \
bool exception_thrown = false; \
try \
{ \
expr; \
} \
catch (const exception &e) \
{ \
exception_thrown = true; \
} \
if (!exception_thrown) \
{ \
std::cerr << "test: " << test_name << ", line: " << __LINE__ \
<< ", "; \
std::cerr << "Exception not thrown: " << #exception << std::endl; \
} \
}
Definition at line 110 of file valfuzz.hpp.
◆ BEFORE
Value: void before(); \
static struct before##_register \
{ \
before##_register() \
{ \
valfuzz::set_function_execute_before(before); \
} \
} before##_register_instance; \
void before()
Definition at line 199 of file valfuzz.hpp.
◆ 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 230 of file valfuzz.hpp.
◆ MAX_RANDOM_STRING_LEN
#define MAX_RANDOM_STRING_LEN 1024 |
◆ TEST
#define TEST |
( |
| name, |
|
|
| pretty_name ) |
Value: void name([[maybe_unused]] const std::string &test_name); \
static struct name##_register \
{ \
name##_register() \
{ \
valfuzz::add_test(pretty_name, name); \
} \
} name##_register_instance; \
void name([[maybe_unused]] const std::string &test_name)
Definition at line 188 of file valfuzz.hpp.