[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 3/6] tests: fix locations in C
From: |
Akim Demaille |
Subject: |
[PATCH 3/6] tests: fix locations in C |
Date: |
Mon, 5 Nov 2012 13:14:27 +0100 |
* tests/local.at (AT_YYERROR_DEFINE): Don't display the end of the location
if it is not after its beginning.
* tests/actions.at, tests/cxx-type.at: Adjust the expected output.
---
tests/actions.at | 2 +-
tests/cxx-type.at | 4 ++--
tests/local.at | 4 ++--
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/tests/actions.at b/tests/actions.at
index b2d5e9d..2314c1c 100644
--- a/tests/actions.at
+++ b/tests/actions.at
@@ -664,7 +664,7 @@ Reading a token: Next token is token 'd' (1.4-1.4: <>
printer for 'd' @ 4)
Shifting token 'd' (1.4-1.4: <> printer for 'd' @ 4)
Entering state 6
Reading a token: Now at end of input.
-1.5-4: syntax error, unexpected $end, expecting 'e'
+1.5: syntax error, unexpected $end, expecting 'e'
Error: popping token 'd' (1.4-1.4: <> printer for 'd' @ 4)
Stack now 0 1 3 5
Error: popping token 'c' (1.3-1.3: 'b'/'c' printer for 'c' @ 3)
diff --git a/tests/cxx-type.at b/tests/cxx-type.at
index f5e7c55..b0e5fdc 100644
--- a/tests/cxx-type.at
+++ b/tests/cxx-type.at
@@ -376,7 +376,7 @@ m4_define([_AT_GLR_STDERR],
]])
m4_define([_AT_GLR_STDERR_WITH_LOC],
-[[17.5-4: syntax error
+[[17.5: syntax error
]])
m4_define([_AT_VERBOSE_GLR_STDERR],
@@ -384,7 +384,7 @@ m4_define([_AT_VERBOSE_GLR_STDERR],
]])
m4_define([_AT_VERBOSE_GLR_STDERR_WITH_LOC],
-[[17.5-4: syntax error, unexpected ID, expecting '=' or '+' or ')'
+[[17.5: syntax error, unexpected ID, expecting '=' or '+' or ')'
]])
## ---------------------------------------------------- ##
diff --git a/tests/local.at b/tests/local.at
index b0ec647..2af7971 100644
--- a/tests/local.at
+++ b/tests/local.at
@@ -388,10 +388,10 @@ static
AT_YYERROR_SEES_LOC_IF([[
fprintf (stderr, "%d.%d",
]AT_LOC_FIRST_LINE[, ]AT_LOC_FIRST_COLUMN[);
- if (]AT_LOC_FIRST_LINE[ != ]AT_LOC_LAST_LINE[)
+ if (]AT_LOC_FIRST_LINE[ < ]AT_LOC_LAST_LINE[)
fprintf (stderr, "-%d.%d",
]AT_LOC_LAST_LINE[, ]AT_LOC_LAST_COLUMN[ - 1);
- else if (]AT_LOC_FIRST_COLUMN[ != ]AT_LOC_LAST_COLUMN[ - 1)
+ else if (]AT_LOC_FIRST_COLUMN[ < ]AT_LOC_LAST_COLUMN[ - 1)
fprintf (stderr, "-%d",
]AT_LOC_LAST_COLUMN[ - 1);
fprintf (stderr, ": ");]])[
--
1.8.0
- [PATCH 0/6] {branch-2.6} Minor changes mostly in the test suite, Akim Demaille, 2012/11/06
- [PATCH 2/6] tests: handle %parse-param in the generated yyerror, Akim Demaille, 2012/11/06
- [PATCH 3/6] tests: fix locations in C,
Akim Demaille <=
- [PATCH 4/6] tests: remove useless location initialization., Akim Demaille, 2012/11/06
- [PATCH 5/6] c++: fix position operator signatures, Akim Demaille, 2012/11/06
- [PATCH 1/6] tests: simplifications, Akim Demaille, 2012/11/06
- [PATCH 6/6] doc: formatting changes, Akim Demaille, 2012/11/06