1#ifndef UTOPIA_CORE_TESTTOOLS_CONFIG_HH
2#define UTOPIA_CORE_TESTTOOLS_CONFIG_HH
10#include <boost/test/unit_test.hpp>
11#include <boost/core/demangle.hpp>
13#include <yaml-cpp/yaml.h>
108template<
typename Callable=std::function<
void(const DataIO::Config&)>>
115 static_assert(std::is_invocable_v<Callable, DataIO::Config&>,
116 "Callable requires DataIO::Config as its only argument!");
126 <<
"' ... with the following parameters:\n\n"
145 else if (
exc_type ==
"std::logic_error") {
148 else if (
exc_type ==
"std::invalid_argument") {
151 else if (
exc_type ==
"std::domain_error") {
154 else if (
exc_type ==
"std::length_error") {
157 else if (
exc_type ==
"std::out_of_range") {
160 else if (
exc_type ==
"std::runtime_error") {
163 else if (
exc_type ==
"std::range_error") {
166 else if (
exc_type ==
"std::overflow_error") {
169 else if (
exc_type ==
"std::underflow_error") {
172 else if (
exc_type ==
"Utopia::KeyError") {
175 else if (
exc_type ==
"Utopia::Exception") {
178 else if (
exc_type ==
"YAML::Exception") {
183 "Invalid exception type '" <<
exc_type <<
"' given in "
184 "`throws` argument! Supported exception types are: "
185 "std::exception, std::logic_error, std::invalid_argument, "
186 "std::domain_error, std::length_error, std::out_of_range, "
187 "std::runtime_error, std::range_error, "
188 "std::overflow_error, std::underflow_error, "
189 "Utopia::KeyError, Utopia::Exception, "
190 "and YAML::Exception."
202 catch (std::exception&
e) {
204 << boost::core::demangle(
typeid(
e).name())
205 <<
") with message: " <<
e.what());
YAML::Node Config
Type of a variadic dictionary-like data structure used throughout Utopia.
Definition types.hh:71
Container select_entities(const Manager &mngr, const DataIO::Config &sel_cfg)
Select entities according to parameters specified in a configuration.
Definition select.hh:213