1#ifndef TATAMI_TEST_THROWS_ERROR_HPP
2#define TATAMI_TEST_THROWS_ERROR_HPP
5#include <gtest/gtest.h>
22template<
class Function_>
26 FAIL() <<
"expected error message '" << msg <<
"', got no error";
27 }
catch (std::exception& e) {
28 std::string observed(e.what());
29 if (observed.find(msg) == std::string::npos) {
30 FAIL() <<
"expected error message '" << msg <<
"', got '" << observed <<
"'";
Utilities for testing tatami libraries.
Definition create_indexed_subset.hpp:15
void throws_error(Function_ fun, const std::string &msg)
Definition throws_error.hpp:23