Celeritas 0.7+6e2d98f
Loading...
Searching...
No Matches
Namespaces | Macros
GeoTests.cc File Reference
#include "GeoTests.hh"
#include <string_view>
#include "corecel/Config.hh"
#include "corecel/OpaqueIdUtils.hh"
#include "corecel/cont/Range.hh"
#include "corecel/io/Logger.hh"
#include "corecel/io/StreamUtils.hh"
#include "corecel/math/ArrayOperators.hh"
#include "corecel/math/ArrayUtils.hh"
#include "corecel/math/Turn.hh"
#include "corecel/sys/Version.hh"
#include "geocel/BoundingBox.hh"
#include "geocel/CheckedGeoTrackView.hh"
#include "geocel/GeoParamsInterface.hh"
#include "geocel/Types.hh"
#include "geocel/VolumeParams.hh"
#include "geocel/detail/LengthUnits.hh"
#include "GenericGeoResults.hh"
#include "GenericGeoTestInterface.hh"
#include "TestMacros.hh"
#include "UnitUtils.hh"

Namespaces

namespace  celeritas::test
 Test harness base class for optical physics.
 

Macros

#define SHOULD_FAIL_WHEN(STATEMENT, COND)
 Allow a statement to skip the test when using a certain geometry.
 

Macro Definition Documentation

◆ SHOULD_FAIL_WHEN

#define SHOULD_FAIL_WHEN (   STATEMENT,
  COND 
)
Value:
do \
{ \
bool threw_{false}; \
try \
{ \
STATEMENT; \
} \
{ \
threw_ = true; \
if (COND) \
{ \
CELER_LOG(debug) \
<< "Ignored expected failure: " << e.details().what; \
} \
else \
{ \
ADD_FAILURE() << "'" << #STATEMENT \
<< "' failed unexpectedly: " << e.what(); \
} \
} \
catch (std::exception const& e) \
{ \
threw_ = true; \
FAIL() << "'" << #STATEMENT \
<< "' failed unexpectedly: " << e.what(); \
} \
\
EXPECT_EQ(COND, threw_); \
} while (0)
Definition CheckedGeoTrackView.hh:201

Allow a statement to skip the test when using a certain geometry.

Run STATEMENT. If and only if COND is true, the statement should throw a CheckedGeoError.