1#ifndef NNGN_TESTS_TESTS_H
2#define NNGN_TESTS_TESTS_H
21inline char *
toString(
const string &
s) {
return QTest::toString(
s.c_str()); }
24 return QTest::toString(
25 QString::fromUtf8(
s.data(),
static_cast<int>(
s.size())));
28template<
typename T,
typename A>
29requires(
requires(ostream &o,
T t) { o << t; })
41 if(f0 == 0 || f1 == 0)
43 return qFloatDistance(f0, f1) <
e;
46template<
template<
typename>
typename V,
typename T, std::size_t
N>
52 for(std::size_t
i = 0;
i <
N; ++
i)
64 for(std::size_t
i = 0;
i != 4; ++
i)
78 return QTest::toString(
s.str().c_str());
83#define F(T) inline char *toString(const T &t) { return to_string(t); }
for i
Definition font.lua:5
local N
Definition gamma.lua:5
char * to_string(const T &v)
Definition tests.h:75
std::uint32_t u32
Definition def.h:14
char * toString(const string &s)
Definition tests.h:21
#define F(...)
Definition pp.cpp:12
v[1]
Definition math.lua:22
Definition graphics.h:136
local e
Definition math.lua:4
bool fuzzy_eq(float f0, float f1, u32 e=fuzzy_eq_e)
Definition tests.h:40
constexpr auto fuzzy_eq_e
Definition tests.h:38
std::chrono::seconds s
Definition timing.cpp:6