isl_pip.c: check return value of fscanf
[isl.git] / polyhedron_sample.c
bloba377bde96ffb4ea618878c3a05e780cf736da005
1 #include <assert.h>
2 #include "isl_sample.h"
3 #include "isl_vec.h"
5 int main(int argc, char **argv)
7 struct isl_ctx *ctx = isl_ctx_alloc();
8 struct isl_basic_set *bset;
9 struct isl_vec *sample;
11 bset = isl_basic_set_read_from_file(ctx, stdin, 0, ISL_FORMAT_POLYLIB);
12 sample = isl_basic_set_sample(isl_basic_set_copy(bset));
13 isl_vec_dump(sample, stdout, 0);
14 assert(sample);
15 if (sample->size > 0)
16 assert(isl_basic_set_contains(bset, sample));
17 isl_basic_set_free(bset);
18 isl_vec_free(sample);
19 isl_ctx_free(ctx);
21 return 0;