isl_map.c: room_for_ineq: add memory management annotation
[isl.git] / check_reparse_test_templ.c
blob58c194ceae93f163cbe1cec9f5a00492540e4ceb
1 #define xCAT(A,B) A ## B
2 #define CAT(A,B) xCAT(A,B)
3 #undef TYPE
4 #define TYPE CAT(isl_,BASE)
5 #define xFN(TYPE,NAME) TYPE ## _ ## NAME
6 #define FN(TYPE,NAME) xFN(TYPE,NAME)
8 #define TESTS CAT(reparse_,CAT(BASE,_tests))
10 /* Test parsing of objects of type TYPE by printing
11 * the expressions and checking that parsing the output results
12 * in the same expression.
13 * Do this for a set of expressions parsed from strings.
15 static isl_stat FN(check,TESTS)(isl_ctx *ctx)
17 int i;
19 for (i = 0; i < ARRAY_SIZE(TESTS); ++i) {
20 TYPE *obj;
22 obj = FN(TYPE,read_from_str)(ctx, TESTS[i]);
23 if (FN(check_reparse,BASE)(ctx, obj) < 0)
24 return isl_stat_error;
27 return isl_stat_ok;