tests: use assert instead of plain abort.

* tests/actions.at, tests/calc.at, tests/conflicts.at,
* tests/cxx-type.at, tests/glr-regression.at, tests/input.at,
* tests/named-refs.at, tests/regression.at, tests/torture.at,
* tests/local.at:
Prefer assert to abort.
This commit is contained in:
Akim Demaille
2012-06-26 10:20:35 +02:00
parent 0e16927b48
commit 77519a7d18
10 changed files with 51 additions and 62 deletions

View File

@@ -45,7 +45,7 @@ m4_define([_AT_DATA_CALC_Y],
[m4_fatal([$0: Invalid arguments: $@])])dnl
m4_pushdef([AT_CALC_MAIN],
[#include <stdlib.h> /* abort */
[#include <assert.h>
#if HAVE_UNISTD_H
# include <unistd.h>
#else
@@ -98,10 +98,8 @@ main (int argc, const char **argv)
status = ]AT_NAME_PREFIX[parse (]AT_PARAM_IF([[&result, &count]])[);
if (fclose (input))
perror ("fclose");
if (global_result != result)
abort ();
if (global_count != count)
abort ();
assert (global_result == result);
assert (global_count == count);
return status;
}
]])