Celeritas  0.5.0-56+6b053cd
Macros
TestMacros.hh File Reference
#include <gtest/gtest.h>
#include "corecel/Config.hh"
#include "testdetail/TestMacrosImpl.hh"
This graph shows which files directly or indirectly include this file:

Macros

#define EXPECT_VEC_EQ(expected, actual)    EXPECT_PRED_FORMAT2(::celeritas::testdetail::IsVecEq, expected, actual)
 Container equality macro.
 
#define EXPECT_REAL_EQ(expected, actual)   EXPECT_DOUBLE_EQ(expected, actual)
 Single-ULP floating point equality macro.
 
#define EXPECT_SOFT_EQ(expected, actual)    EXPECT_PRED_FORMAT2(::celeritas::testdetail::IsSoftEquiv, expected, actual)
 Soft equivalence macro.
 
#define EXPECT_SOFT_NEAR(expected, actual, rel_error)
 Soft equivalence macro with relative error. More...
 
#define EXPECT_VEC_SOFT_EQ(expected, actual)
 Container soft equivalence macro. More...
 
#define EXPECT_VEC_NEAR(expected, actual, rel_error)
 Container soft equivalence macro with relative error. More...
 
#define EXPECT_VEC_CLOSE(expected, actual, rel_error, abs_thresh)
 Container soft equivalence macro with relative and absolute error. More...
 
#define PRINT_EXPECTED(data)    ::celeritas::testdetail::print_expected(data, #data)
 Print the given container as an array for regression testing.
 
#define EXPECT_JSON_EQ(expected, actual)    EXPECT_PRED_FORMAT2(::celeritas::testdetail::IsJsonEq, expected, actual)
 JSON string equality (soft equal for floats)
 
#define TEST_IF_CELERITAS_DEBUG(name)   DISABLED_##name
 Construct a test name that is disabled when assertions are enabled.
 
#define TEST_IF_CELER_DEVICE(name)   DISABLED_##name
 Construct a test name that is disabled when CUDA/HIP are disabled.
 
#define TEST_IF_CELERITAS_DOUBLE(name)   name
 Construct a test name that is disabled unless using double-precision real.
 
#define TEST_IF_CELERITAS_GEANT(name)   DISABLED_##name
 Construct a test name that is disabled when Geant4 is disabled.
 
#define TEST_IF_CELERITAS_USE_ROOT(name)   DISABLED_##name
 Construct a test name that is disabled when ROOT is disabled.
 

Macro Definition Documentation

◆ EXPECT_SOFT_NEAR

#define EXPECT_SOFT_NEAR (   expected,
  actual,
  rel_error 
)
Value:
EXPECT_PRED_FORMAT3( \
::celeritas::testdetail::IsSoftEquiv, expected, actual, rel_error)

Soft equivalence macro with relative error.

◆ EXPECT_VEC_CLOSE

#define EXPECT_VEC_CLOSE (   expected,
  actual,
  rel_error,
  abs_thresh 
)
Value:
EXPECT_PRED_FORMAT4(::celeritas::testdetail::IsVecSoftEquiv, \
expected, \
actual, \
rel_error, \
abs_thresh)

Container soft equivalence macro with relative and absolute error.

◆ EXPECT_VEC_NEAR

#define EXPECT_VEC_NEAR (   expected,
  actual,
  rel_error 
)
Value:
EXPECT_PRED_FORMAT3( \
::celeritas::testdetail::IsVecSoftEquiv, expected, actual, rel_error)

Container soft equivalence macro with relative error.

◆ EXPECT_VEC_SOFT_EQ

#define EXPECT_VEC_SOFT_EQ (   expected,
  actual 
)
Value:
EXPECT_PRED_FORMAT2( \
::celeritas::testdetail::IsVecSoftEquiv, expected, actual)

Container soft equivalence macro.