Update: Changed contract violation handler to be able to test contract violations with Google Test
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
#include <contracts>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
|
||||
void handle_contract_violation(const std::contracts::contract_violation&) {
|
||||
[[maybe_unused]] static void handle_contract_violation(const std::contracts::contract_violation& violation) {
|
||||
std::fprintf(stderr, "contract violation: %s\n", violation.comment());
|
||||
std::abort();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user