Macros
testing.h File Reference
#include <math.h>
#include <stdlib.h>
Include dependency graph for testing.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define EXPECT_EQ(a, b)
 
#define EXPECT_FALSE(args)
 
#define EXPECT_FLOAT_EQ(a, b)
 
#define EXPECT_NEAR(a, b, prec)
 
#define EXPECT_TRUE(args)
 

Macro Definition Documentation

◆ EXPECT_EQ

#define EXPECT_EQ (   a,
 
)
Value:
{ \
if (!(a == b)) { std::cerr << "test failed: " <<a<<"!="<<b<< " in " \
<< __FILE__ << ", line " <<__LINE__ << std::endl; \
exit(1); \
} }

Definition at line 16 of file testing.h.

◆ EXPECT_FALSE

#define EXPECT_FALSE (   args)
Value:
{ \
if (args) { fprintf(stderr, "test failed (EXPECT_FALSE) in %s, line %d\n", __FILE__, __LINE__); \
exit(1); \
} }

Definition at line 11 of file testing.h.

◆ EXPECT_FLOAT_EQ

#define EXPECT_FLOAT_EQ (   a,
 
)
Value:
{ \
if (!(fabs(a-b) <= 1e-5)) { fprintf(stderr, "test failed: %f != %f in %s, line %d\n", a, b, __FILE__, __LINE__); \
exit(1); \
} }

Definition at line 22 of file testing.h.

◆ EXPECT_NEAR

#define EXPECT_NEAR (   a,
  b,
  prec 
)
Value:
{ \
if (!(fabs(a-b) <= prec)) { fprintf(stderr, "test failed: |%f - %f| > %f in %s, line %d\n", a, b, prec, __FILE__, __LINE__); \
exit(1); \
} }

Definition at line 27 of file testing.h.

◆ EXPECT_TRUE

#define EXPECT_TRUE (   args)
Value:
{ \
if (!(args)) { fprintf(stderr, "test failed (EXPECT_TRUE) in %s, line %d\n", __FILE__, __LINE__); \
exit(1); \
} }

Definition at line 6 of file testing.h.



octomap
Author(s): Kai M. Wurm , Armin Hornung
autogenerated on Mon Feb 28 2022 22:58:06