mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-18 00:33:03 +00:00
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:
@@ -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++];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user