10 #include <gtest/gtest.h> 15 TEST(exception, stackedExceptionBasic)
41 TEST(exception, stackedExceptionComplex)
46 GTEST_FAIL() <<
"Shouldn't reach here.";
48 catch (
const std::exception& e)
52 const auto num_lines = std::count(sExc.begin(), sExc.end(),
'\n');
57 TEST(exception, assertException)
59 bool trueValue =
true;
60 bool falseValue =
false;
61 EXPECT_THROW({
ASSERT_EQUAL_(trueValue, falseValue); }, std::logic_error);
64 TEST(exception, stackedExceptionCustomMsg)
#define THROW_EXCEPTION(msg)
void test_except_2nd_lvl()
#define ASSERT_EQUAL_(__A, __B)
Assert comparing two values, reporting their actual values upon failure.
void test_except_toplevel()
EXPECT_EQ(out.image_pair_was_used.size(), NUM_IMGS)
std::string exception_to_str(const std::exception &e)
Builds a nice textual representation of a nested exception, which if generated using MRPT macros (THR...
TEST(exception, stackedExceptionBasic)
void test_except_3rd_lvl()
#define THROW_STACKED_EXCEPTION_CUSTOM_MSG2(stuff, param1)
#define THROW_STACKED_EXCEPTION