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

@@ -57,6 +57,7 @@ AT_DATA_GRAMMAR([input.y],
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#define YYERROR_VERBOSE 1
]AT_YYERROR_DEFINE[
@@ -67,8 +68,7 @@ static int
yylex (void)
{
static size_t toknum;
if (! (toknum <= strlen (input)))
abort ();
assert (toknum <= strlen (input));
return input[toknum++];
}