summaryrefslogtreecommitdiff
path: root/tests/cxx-type.at
diff options
context:
space:
mode:
authorAkim Demaille <akim@lrde.epita.fr>2012-06-26 10:20:35 +0200
committerAkim Demaille <akim@lrde.epita.fr>2012-06-26 13:55:50 +0200
commit77519a7d18266500754693b5e9e4b89608d6ed2c (patch)
tree0b98e0176c8ba8ec0065568606b5a1131bf8279b /tests/cxx-type.at
parent0e16927b48c881317a38132923b6f3150802a7d3 (diff)
downloadbison-77519a7d18266500754693b5e9e4b89608d6ed2c.tar.gz
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.
Diffstat (limited to 'tests/cxx-type.at')
-rw-r--r--tests/cxx-type.at10
1 files changed, 4 insertions, 6 deletions
diff --git a/tests/cxx-type.at b/tests/cxx-type.at
index e172033a..f5e7c559 100644
--- a/tests/cxx-type.at
+++ b/tests/cxx-type.at
@@ -122,12 +122,12 @@ declarator : ID
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
+#include <assert.h>
int
main (int argc, char **argv)
{
- if (argc != 2)
- abort ();
+ assert (argc == 2);
if (!freopen (argv[1], "r", stdin))
return 3;
return yyparse ();
@@ -152,8 +152,7 @@ main (int argc, char **argv)
while (1)
{
- if (feof (stdin))
- abort ();
+ assert (!feof (stdin));
c = getchar ();
switch (c)
{
@@ -182,8 +181,7 @@ main (int argc, char **argv)
{
buffer[i++] = c;
colNum += 1;
- if (i == sizeof buffer - 1)
- abort ();
+ assert (i != sizeof buffer - 1);
c = getchar ();
}
while (isalnum (c) || c == '_');