2 * Copyright 2021 Cerebras Systems
4 * Use of this software is governed by the MIT license
6 * Written by Sven Verdoolaege,
7 * Cerebras Systems, 1237 E Arques Ave, Sunnyvale, CA, USA
10 #define xCAT(A,B) A ## B
11 #define CAT(A,B) xCAT(A,B)
13 #define TYPE CAT(isl_,BASE)
14 #define xFN(TYPE,NAME) TYPE ## _ ## NAME
15 #define FN(TYPE,NAME) xFN(TYPE,NAME)
18 #define TESTS CAT(parse_,CAT(BASE,_fail_tests))
20 /* Test parsing of objects of type TYPE
21 * that are expected to fail.
23 static isl_stat
FN(check
,TESTS
)(isl_ctx
*ctx
)
28 on_error
= isl_options_get_on_error(ctx
);
29 isl_options_set_on_error(ctx
, ISL_ON_ERROR_CONTINUE
);
30 n
= ARRAY_SIZE(TESTS
);
31 for (i
= 0; i
< n
; ++i
) {
34 obj
= FN(TYPE
,read_from_str
)(ctx
, TESTS
[i
]);
39 isl_options_set_on_error(ctx
, on_error
);
41 isl_die(ctx
, isl_error_unknown
,
42 "parsing not expected to succeed",
43 return isl_stat_error
);