tests: compute verbose error messages from the custom ones

We use a different format to check parse.error custom.  Compute the
"verbose" one from it instead of forcing the test author to provide
the various formats of expected error messages.

* tests/calc.at (_AT_CHECK_CALC_ERROR): Handle this transformation
when needed.
Simplify callers.
This commit is contained in:
Akim Demaille
2020-01-12 07:53:11 +01:00
parent 68ef3a0466
commit ee97f37cb4
2 changed files with 25 additions and 39 deletions

View File

@@ -574,6 +574,8 @@ static int location_print (FILE *yyo, ]AT_YYLTYPE[ const * const yylocp);
static ]AT_YYERROR_DECLARE_EXTERN])
# "%define parse.error custom" uses a different format, easy to check.
# The "verbose" one can be computed from it (see _AT_CHECK_CALC_ERROR).
m4_define([AT_YYERROR_DEFINE(c)],
[AT_LOCATION_IF([[
# if defined ]AT_YYLTYPE[_IS_TRIVIAL && ]AT_YYLTYPE[_IS_TRIVIAL