1
0
Fork 0
mirror of https://github.com/mapnik/mapnik.git synced 2025-02-22 14:54:24 +01:00
mapnik/test/catch_ext.hpp
2022-11-10 15:57:38 +00:00

25 lines
1.9 KiB
C++

#ifndef TEST_CATCH_EXT_HPP
#define TEST_CATCH_EXT_HPP
#include "catch.hpp"
#define TRY_CHECK(expr) \
try \
{ \
CHECK(expr); \
} \
catch (Catch::TestFailureException&) \
{ \
/* thrown by CHECK after it catches and reports */ \
/* an exception from expr => swallow this */ \
}
#define TRY_CHECK_FALSE(expr) \
try \
{ \
CHECK_FALSE(expr); \
} \
catch (Catch::TestFailureException&) \
{}
#endif // TEST_CATCH_EXT_HPP