Luanti 5.10.0-dev
 
Loading...
Searching...
No Matches
test_utilities.cpp File Reference
#include "test.h"
#include <cmath>
#include "util/enriched_string.h"
#include "util/numeric.h"
#include "util/string.h"
#include "util/base64.h"
#include "util/colorize.h"
+ Include dependency graph for test_utilities.cpp:

Classes

class  TestUtilities
 

Macros

#define cast_v3(T, other)   T((other).X, (other).Y, (other).Z)
 

Functions

float ref_WrapDegrees180 (float f)
 
float ref_WrapDegrees_0_360 (float f)
 
static bool within (const f32 value1, const f32 value2, const f32 precision)
 
static bool within (const v3f &v1, const v3f &v2, const f32 precision)
 
static bool within (const core::matrix4 &m1, const core::matrix4 &m2, const f32 precision)
 
static bool roundTripsDeg (const v3f &v, const f32 precision)
 
template<typename F , typename C >
apply_all (const C &co, F functor)
 

Variables

static TestUtilities g_test_instance
 

Macro Definition Documentation

◆ cast_v3

#define cast_v3 ( T,
other )   T((other).X, (other).Y, (other).Z)

Function Documentation

◆ apply_all()

template<typename F , typename C >
C apply_all ( const C & co,
F functor )

Referenced by TestUtilities::testIsBlockInSight().

+ Here is the caller graph for this function:

◆ ref_WrapDegrees180()

float ref_WrapDegrees180 ( float f)
inline

Referenced by TestUtilities::testAngleWrapAround().

+ Here is the caller graph for this function:

◆ ref_WrapDegrees_0_360()

float ref_WrapDegrees_0_360 ( float f)
inline

Referenced by TestUtilities::testAngleWrapAround().

+ Here is the caller graph for this function:

◆ roundTripsDeg()

static bool roundTripsDeg ( const v3f & v,
const f32 precision )
static

References getPitchYawRoll(), setPitchYawRoll(), and within().

Referenced by TestUtilities::testEulerConversion().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ within() [1/3]

static bool within ( const core::matrix4 & m1,
const core::matrix4 & m2,
const f32 precision )
static

References within().

+ Here is the call graph for this function:

◆ within() [2/3]

static bool within ( const f32 value1,
const f32 value2,
const f32 precision )
static

Referenced by roundTripsDeg(), TestUtilities::testEulerConversion(), within(), and within().

+ Here is the caller graph for this function:

◆ within() [3/3]

static bool within ( const v3f & v1,
const v3f & v2,
const f32 precision )
static

References within().

+ Here is the call graph for this function:

Variable Documentation

◆ g_test_instance

TestUtilities g_test_instance
static