mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-15 23: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:
@@ -442,6 +442,7 @@ char apostrophe = '\'';
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
%}
|
||||
/* %{ and %} can be here too. */
|
||||
|
||||
@@ -509,8 +510,7 @@ yylex (void)
|
||||
#output "; /* "
|
||||
*/
|
||||
static size_t toknum;
|
||||
if (! (toknum < sizeof input))
|
||||
abort ();
|
||||
assert (toknum < sizeof input);
|
||||
yylval = value_as_yystype (input[toknum]);
|
||||
return input[toknum++];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user