mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-18 16:53:02 +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:
@@ -910,6 +910,7 @@ yyparse ()
|
||||
}
|
||||
])
|
||||
|
||||
#include <assert.h>
|
||||
static int
|
||||
yylex (AT_LALR1_CC_IF([int *lval], [void]))
|
||||
[{
|
||||
@@ -919,8 +920,7 @@ yylex (AT_LALR1_CC_IF([int *lval], [void]))
|
||||
};
|
||||
static size_t toknum;
|
||||
]AT_LALR1_CC_IF([*lval = 0; /* Pacify GCC. */])[
|
||||
if (! (toknum < sizeof tokens / sizeof *tokens))
|
||||
abort ();
|
||||
assert (toknum < sizeof tokens / sizeof *tokens);
|
||||
return tokens[toknum++];
|
||||
}]
|
||||
|
||||
@@ -995,6 +995,7 @@ yyparse ()
|
||||
}
|
||||
])[
|
||||
|
||||
#include <assert.h>
|
||||
static int
|
||||
yylex (]AT_LALR1_CC_IF([int *lval], [void])[)
|
||||
{
|
||||
@@ -1004,8 +1005,7 @@ yylex (]AT_LALR1_CC_IF([int *lval], [void])[)
|
||||
};
|
||||
static size_t toknum;
|
||||
]AT_LALR1_CC_IF([*lval = 0; /* Pacify GCC. */])[
|
||||
if (! (toknum < sizeof tokens / sizeof *tokens))
|
||||
abort ();
|
||||
assert (toknum < sizeof tokens / sizeof *tokens);
|
||||
return tokens[toknum++];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user