testsuite/backend/genesys: Fix [-Wcatch-value=] compiler warning

Exceptions ought to be caught by reference.
merge-requests/309/head
Olaf Meeuwissen 2020-01-13 18:35:33 +09:00
rodzic 77c92f49af
commit ba84a8f69c
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -96,11 +96,11 @@ inline void check_raises_raised_unexpected(const char* function, const char* pat
#define ASSERT_FALSE(x) do { check_true(!bool(x), __func__, __FILE__, __LINE__); } \
while (false)
#define ASSERT_RAISES(x, e) \
#define ASSERT_RAISES(x, T) \
do { try { \
x; \
check_raises_did_not_raise(__func__, __FILE__, __LINE__); \
} catch (e) { \
} catch (const T&) { \
check_raises_success(__func__, __FILE__, __LINE__); \
} catch (...) { \
check_raises_raised_unexpected(__func__, __FILE__, __LINE__); \