/* xbt_str.cpp - various helping functions to deal with strings */
-/* Copyright (c) 2007-2019. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2007-2020. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
template <typename F> void test_parse_error(F function, const std::string& name, const char* str)
{
INFO(name);
- REQUIRE_THROWS_MATCHES(function(str, "Parse error"), xbt_ex,
- Catch::Matchers::Predicate<xbt_ex>([](xbt_ex const& e) { return e.category == arg_error; },
- "category arg_error"));
+ REQUIRE_THROWS_AS(function(str, "Parse error"), std::invalid_argument);
}
template <typename F, typename T> void test_parse_ok(F function, const std::string& name, const char* str, T value)