Add a message if tmpfile() returns NULL

This commit is contained in:
Isuru Fernando 2020-04-29 10:33:20 -05:00
parent 2f6465ee30
commit 02aa1fbae0

View file

@ -33,6 +33,10 @@ int main()
arb_randtest_special(x, state, 1 + n_randint(state, 1000), 1 + n_randint(state, 100));
tmp = tmpfile();
if (tmp == NULL) {
flint_printf("FAIL (creating temporary file) iter = %wd\n\n", iter);
flint_abort();
}
arb_dump_file(tmp, x);
fflush(tmp);
rewind(tmp);