bison-patches
[Top][All Lists]
Advanced

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

FYI: tests: style changes


From: Akim Demaille
Subject: FYI: tests: style changes
Date: Mon, 16 Apr 2012 17:14:17 +0200

Installed in master, cherry-picked in maint.

From abcd36ca1b658b108fc926f19cb9e45fb41daa65 Mon Sep 17 00:00:00 2001
From: Akim Demaille <address@hidden>
Date: Mon, 16 Apr 2012 16:34:00 +0200
Subject: [PATCH 1/3] tests: style changes.

* tests/input.at: Use "print" in %printer instead of "destroy".
It is unused, so we don't care, yet it is less surprising.
* tests/actions.at: Comment changes.
---
 tests/actions.at |    2 +-
 tests/input.at   |   58 +++++++++++++++++++++++++++---------------------------
 2 files changed, 30 insertions(+), 30 deletions(-)

diff --git a/tests/actions.at b/tests/actions.at
index 7f82502..8be86f0 100644
--- a/tests/actions.at
+++ b/tests/actions.at
@@ -889,7 +889,7 @@ AT_CLEANUP
 AT_SETUP([Default %printer and %destructor for user-defined end token])
 
 # _AT_CHECK_DEFAULT_PRINTER_AND_DESTRUCTOR_FOR_END_TOKEN(TYPED)
-# -----------------------------------------------------------------------------
+# -------------------------------------------------------------
 m4_define([_AT_CHECK_DEFAULT_PRINTER_AND_DESTRUCTOR_FOR_END_TOKEN],
 [m4_if($1, 0,
   [m4_pushdef([kind], []) m4_pushdef([not_kind], [*])],
diff --git a/tests/input.at b/tests/input.at
index 84ae0ff..d0bc51a 100644
--- a/tests/input.at
+++ b/tests/input.at
@@ -177,53 +177,53 @@ AT_SETUP([Default %printer and %destructor redeclared])
 
 AT_DATA([[input.y]],
 [[%destructor { destroy ($$); } <*> <*>
-%printer { destroy ($$); } <*> <*>
+%printer { print ($$); } <*> <*>
 
 %destructor { destroy ($$); } <*>
-%printer { destroy ($$); } <*>
+%printer { print ($$); } <*>
 
 %destructor { destroy ($$); } <> <>
-%printer { destroy ($$); } <> <>
+%printer { print ($$); } <> <>
 
 %destructor { destroy ($$); } <>
-%printer { destroy ($$); } <>
+%printer { print ($$); } <>
 
 %%
 
 start: ;
 
 %destructor { destroy ($$); } <*>;
-%printer { destroy ($$); } <*>;
+%printer { print ($$); } <*>;
 
 %destructor { destroy ($$); } <>;
-%printer { destroy ($$); } <>;
+%printer { print ($$); } <>;
 ]])
 
 AT_BISON_CHECK([input.y], [1], [],
 [[input.y:1.13-29: redeclaration for default tagged %destructor
 input.y:1.13-29: previous declaration
-input.y:2.10-26: redeclaration for default tagged %printer
-input.y:2.10-26: previous declaration
+input.y:2.10-24: redeclaration for default tagged %printer
+input.y:2.10-24: previous declaration
 input.y:4.13-29: redeclaration for default tagged %destructor
 input.y:1.13-29: previous declaration
-input.y:5.10-26: redeclaration for default tagged %printer
-input.y:2.10-26: previous declaration
+input.y:5.10-24: redeclaration for default tagged %printer
+input.y:2.10-24: previous declaration
 input.y:7.13-29: redeclaration for default tagless %destructor
 input.y:7.13-29: previous declaration
-input.y:8.10-26: redeclaration for default tagless %printer
-input.y:8.10-26: previous declaration
+input.y:8.10-24: redeclaration for default tagless %printer
+input.y:8.10-24: previous declaration
 input.y:10.13-29: redeclaration for default tagless %destructor
 input.y:7.13-29: previous declaration
-input.y:11.10-26: redeclaration for default tagless %printer
-input.y:8.10-26: previous declaration
+input.y:11.10-24: redeclaration for default tagless %printer
+input.y:8.10-24: previous declaration
 input.y:17.13-29: redeclaration for default tagged %destructor
 input.y:4.13-29: previous declaration
-input.y:18.10-26: redeclaration for default tagged %printer
-input.y:5.10-26: previous declaration
+input.y:18.10-24: redeclaration for default tagged %printer
+input.y:5.10-24: previous declaration
 input.y:20.13-29: redeclaration for default tagless %destructor
 input.y:10.13-29: previous declaration
-input.y:21.10-26: redeclaration for default tagless %printer
-input.y:11.10-26: previous declaration
+input.y:21.10-24: redeclaration for default tagless %printer
+input.y:11.10-24: previous declaration
 ]])
 
 AT_CLEANUP
@@ -237,17 +237,17 @@ AT_SETUP([Per-type %printer and %destructor redeclared])
 
 AT_DATA([[input.y]],
 [[%destructor { destroy ($$); } <field1> <field2>
-%printer { destroy ($$); } <field1> <field2>
+%printer { print ($$); } <field1> <field2>
 
 %destructor { destroy ($$); } <field1> <field1>
-%printer { destroy ($$); } <field2> <field2>
+%printer { print ($$); } <field2> <field2>
 
 %%
 
 start: ;
 
 %destructor { destroy ($$); } <field2> <field1>;
-%printer { destroy ($$); } <field2> <field1>;
+%printer { print ($$); } <field2> <field1>;
 ]])
 
 AT_BISON_CHECK([input.y], [1], [],
@@ -255,18 +255,18 @@ AT_BISON_CHECK([input.y], [1], [],
 input.y:1.13-29: previous declaration
 input.y:4.13-29: %destructor redeclaration for <field1>
 input.y:4.13-29: previous declaration
-input.y:5.10-26: %printer redeclaration for <field2>
-input.y:2.10-26: previous declaration
-input.y:5.10-26: %printer redeclaration for <field2>
-input.y:5.10-26: previous declaration
+input.y:5.10-24: %printer redeclaration for <field2>
+input.y:2.10-24: previous declaration
+input.y:5.10-24: %printer redeclaration for <field2>
+input.y:5.10-24: previous declaration
 input.y:11.13-29: %destructor redeclaration for <field1>
 input.y:4.13-29: previous declaration
 input.y:11.13-29: %destructor redeclaration for <field2>
 input.y:1.13-29: previous declaration
-input.y:12.10-26: %printer redeclaration for <field1>
-input.y:2.10-26: previous declaration
-input.y:12.10-26: %printer redeclaration for <field2>
-input.y:5.10-26: previous declaration
+input.y:12.10-24: %printer redeclaration for <field1>
+input.y:2.10-24: previous declaration
+input.y:12.10-24: %printer redeclaration for <field2>
+input.y:5.10-24: previous declaration
 ]])
 
 AT_CLEANUP
-- 
1.7.9.5





reply via email to

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