bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

style: clean tests


From: Akim Demaille
Subject: style: clean tests
Date: Sat, 5 Jan 2019 14:53:16 +0100

commit eb2b5aef0a2851063e49a2d68eacdc664964b0a9
Author: Akim Demaille <address@hidden>
Date:   Fri Jan 4 12:36:50 2019 +0100

    style: clean tests
    
    * tests/named-refs.at: here.

diff --git a/tests/calc.at b/tests/calc.at
index 0820d7e8..31bc43a8 100644
--- a/tests/calc.at
+++ b/tests/calc.at
@@ -272,12 +272,12 @@ static int power (int base, int exponent);
 ]AT_YYLEX_DECLARE_EXTERN[
 }
 
-]AT_CXX_IF([AT_LOCATION_TYPE_SPAN_IF([[
+]AT_LOCATION_TYPE_SPAN_IF([[
 %initial-action
 {
   @$.first.l = @$.first.c = 1;
   @$.last = @$.first;
-}]])])[
+}]])[
 
 /* Bison Declarations */
 %token CALC_EOF 0 "end of input"
@@ -333,8 +333,7 @@ power (int base, int exponent)
   return res;
 }
 
-]AT_CXX_IF(
-[AT_LOCATION_TYPE_SPAN_IF([[
+]AT_LOCATION_TYPE_SPAN_IF([[
 namespace
 {
   std::ostream&
@@ -348,7 +347,7 @@ namespace
     return o;
   }
 }
-]])])[
+]])[
 ]AT_YYERROR_DEFINE[
 ]AT_DEFINES_IF([],
 [AT_CALC_LEX
diff --git a/tests/named-refs.at b/tests/named-refs.at
index 43b04ce5..ad9097f0 100644
--- a/tests/named-refs.at
+++ b/tests/named-refs.at
@@ -18,6 +18,7 @@
 # FIXME: Duplication with calc.at.
 AT_BANNER([[Named references tests.]])
 
+# FIXME: large duplication with calc.at.
 AT_SETUP([Tutorial calculator])
 AT_BISON_OPTION_PUSHDEFS
 AT_DATA_GRAMMAR([test.y],
@@ -86,8 +87,7 @@ exp:
 ]AT_YYERROR_DEFINE[
 static int get_char (void)
 {
-  int res = getc (input);
-  return res;
+  return getc (input);
 }
 
 static void unget_char (int c)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]