blob: b213af980daab6b36dd7c390563219a069580b85 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
/*
* This source code is released into the public domain.
*/
#include <catch2/catch_test_macros.hpp>
import nihil;
using namespace std::literals;
TEST_CASE("generic_error: basic", "[generic_error]") {
try {
throw nihil::generic_error("{} + {} = {}", 1, 2, 3);
} catch (nihil::generic_error const &exc) {
REQUIRE(exc.what() == "1 + 2 = 3"s);
}
}
|