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

@@ -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++];
}