Go to the documentation of this file.
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 ASSERT_EQUAL_(__A, __B)
Assert comparing two values, reporting their actual values upon failure.
void test_except_3rd_lvl()
#define THROW_EXCEPTION(msg)
TEST(exception, stackedExceptionBasic)
EXPECT_EQ(out.image_pair_was_used.size(), NUM_IMGS)
#define THROW_STACKED_EXCEPTION_CUSTOM_MSG2(stuff, param1)
void test_except_2nd_lvl()
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...
void test_except_toplevel()
#define THROW_STACKED_EXCEPTION
Page generated by Doxygen 1.8.17 for MRPT 2.0.4 at Sun Jul 19 17:54:30 UTC 2020 | |