nngn
Loading...
Searching...
No Matches
tests.h File Reference
#include <sstream>
#include <string>
#include <string_view>
#include <vector>
#include <QTest>
#include "debug.h"
#include "graphics/graphics.h"
#include "utils/literals.h"
Include dependency graph for tests.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  std
 
namespace  nngn
 
namespace  nngn::anonymous_namespace{tests.h}
 

Macros

#define F(T)   inline char *toString(const T &t) { return to_string(t); }
 

Functions

char * std::toString (const string &s)
 
char * std::toString (string_view s)
 
template<typename T , typename A >
requires (requires(ostream &o, T t) { o << t; })
char * std::toString (const vector< T, A > &v)
 
bool fuzzy_eq (float f0, float f1, u32 e=fuzzy_eq_e)
 
template<template< typename > typename V, typename T , std::size_t N>
bool fuzzy_eq (const nngn::vec< V, T, N > &v0, const nngn::vec< V, T, N > &v1, u32 e=fuzzy_eq_e)
 
template<typename T >
bool fuzzy_eq (const nngn::mat4_base< T > &m0, const nngn::mat4_base< T > &m1, u32 e=fuzzy_eq_e)
 
template<typename T >
char * nngn::anonymous_namespace{tests.h}::to_string (const T &v)
 
template<typename T >
char * nngn::toString (const vec2_base< T > &t)
 
template<typename T >
char * nngn::toString (const vec3_base< T > &t)
 
template<typename T >
char * nngn::toString (const vec4_base< T > &t)
 
char * nngn::toString (const mat3 &t)
 
char * nngn::toString (const mat4 &t)
 
char * nngn::toString (const Vertex &t)
 

Variables

constexpr auto fuzzy_eq_e = 1_u32 << 4
 

Macro Definition Documentation

◆ F

#define F (   T)    inline char *toString(const T &t) { return to_string(t); }

Function Documentation

◆ fuzzy_eq() [1/3]

template<typename T >
bool fuzzy_eq ( const nngn::mat4_base< T > &  m0,
const nngn::mat4_base< T > &  m1,
u32  e = fuzzy_eq_e 
)
inline
Here is the call graph for this function:

◆ fuzzy_eq() [2/3]

template<template< typename > typename V, typename T , std::size_t N>
bool fuzzy_eq ( const nngn::vec< V, T, N > &  v0,
const nngn::vec< V, T, N > &  v1,
u32  e = fuzzy_eq_e 
)
inline
Here is the call graph for this function:

◆ fuzzy_eq() [3/3]

bool fuzzy_eq ( float  f0,
float  f1,
u32  e = fuzzy_eq_e 
)
inline
Here is the caller graph for this function:

Variable Documentation

◆ fuzzy_eq_e

constexpr auto fuzzy_eq_e = 1_u32 << 4
inlineconstexpr