You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
1.8 KiB
33 lines
1.8 KiB
// This file is under GNU General Public License 3.0
|
|
// see LICENSE.txt
|
|
|
|
#ifndef PITYTEST_PITYTEST_HH
|
|
#define PITYTEST_PITYTEST_HH
|
|
|
|
#include "PityUnit.hh"
|
|
#include "PityModel.hh"
|
|
#include "PitySwarm.hh"
|
|
#include "PityPerspective.hh"
|
|
#include "AbstractPityUnit.hh"
|
|
|
|
#ifndef PITYASSERT
|
|
#define PITYASSERT(condition, msg) \
|
|
do { \
|
|
if (!(condition)) { \
|
|
throw pEp::PityTest11::PityAssertException(msg); \
|
|
} \
|
|
} while (0);
|
|
#endif
|
|
|
|
#define PITYASSERT_THROWS(func, msg) \
|
|
do { \
|
|
try { \
|
|
(func); \
|
|
PITYASSERT(false, msg); \
|
|
} catch (const pEp::PityTest11::PityAssertException& pae) { \
|
|
throw(pae); \
|
|
} catch (const std::exception& e) { \
|
|
} catch (...) { \
|
|
} \
|
|
} while (0);
|
|
#endif
|