mirror of
https://github.com/red0124/ssp.git
synced 2025-12-14 21:59:55 +01:00
Add converter tests with throw_on_error
This commit is contained in:
@@ -79,3 +79,13 @@ struct buffer {
|
||||
}
|
||||
|
||||
#define CHECK_NOT_VARIANT(var, type) CHECK(!std::holds_alternative<type>(var));
|
||||
// TODO remove
|
||||
#include <iostream>
|
||||
|
||||
#define REQUIRE_EXCEPTION(...) \
|
||||
try { \
|
||||
__VA_ARGS__; \
|
||||
FAIL("Expected exception"); \
|
||||
} catch (ss::exception & e) { \
|
||||
CHECK_FALSE(std::string{e.what()}.empty()); \
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user