11static void die_impl(
const char *file,
int line,
const char *message)
13 std::ostringstream ss;
14 ss << file <<
":" << line <<
": " << message;
15 throw std::runtime_error(ss.str());
18#define die(msg) die_impl(__FILE__, __LINE__, msg)
29 }
catch (
const isl::exception_invalid &e) {
33 die(
"no invalid exception was generated");
46 isl::id id3(ctx,
"test3", std::string(
"s"));
48 auto int_user =
id.user<
int>();
50 die(
"wrong integer retrieved from isl::id");
51 auto s_user = id3.
user<std::string>();
53 die(
"wrong string retrieved from isl::id");
isl_ctx * isl_ctx_alloc(void)
void isl_ctx_free(isl_ctx *ctx)
isl_stat isl_stat(* fn)(__isl_take ISL_KEY *key, __isl_take ISL_VAL *val, void *user)
static void test_try_user(isl::ctx ctx)
static void check_invalid(const std::function< void(void)> &fn)
static void die_impl(const char *file, int line, const char *message)
static void test_user(isl::ctx ctx)
isl_stat isl_options_set_on_error(isl_ctx *ctx, int val)
#define ISL_ON_ERROR_ABORT