bison-patches
[Top][All Lists]
Advanced

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

Re: [PATCH] tests: check token numbers.


From: Akim Demaille
Subject: Re: [PATCH] tests: check token numbers.
Date: Thu, 14 May 2009 10:01:35 +0200


Le 14 mai 09 à 09:54, Joel E. Denny a écrit :

On Tue, 5 May 2009, Akim Demaille wrote:

        * tests/input.at (Numbered tokens): New.

On branch-2.5, this test case fails for me as follows:

17. input.at:681: testing ...
./input.at:693: VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary -- show-reachable=no"; export VALGRIND_OPTS; bison input.y
--- -   2009-05-14 00:07:35.868752224 -0400
+++ /home/jdenny/cs/bison/bison-git/tests/testsuite.dir/at-groups/17/ stderr 2009-05-14 00:07:35.000000000 -0400
@@ -1,3 +1,3 @@
-input.y:12.12-20: tokens HEXADECIMAL_2 and DECIMAL_2 both assigned number 16702650 +input.y:11.8-20: tokens DECIMAL_2 and HEXADECIMAL_2 both assigned number 16702650 input.y:9.8-20: tokens DECIMAL_1 and HEXADECIMAL_1 both assigned number 11259375

On master, it fails as follows:

17. input.at:676: testing ...
./input.at:688: VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary -- show-reachable=no"; export VALGRIND_OPTS; bison input.y
--- -   2009-05-14 00:18:29.854049565 -0400
+++ /home/jdenny/cs/bison/bison-git/tests/testsuite.dir/at-groups/17/ stderr 2009-05-14 00:18:29.000000000 -0400
@@ -1,3 +1,3 @@
-input.y:12.12-20: tokens HEXADECIMAL_2 and DECIMAL_2 both assigned number 16702650 -input.y:9.8-20: tokens DECIMAL_1 and HEXADECIMAL_1 both assigned number 11259375 +input.y:10.12-20: tokens HEXADECIMAL_1 and DECIMAL_1 both assigned number 11259375 +input.y:11.8-20: tokens DECIMAL_2 and HEXADECIMAL_2 both assigned number 16702650

It looks like the hash iteration order is undefined.

Yes, indeed.

I suppose the test
could check for each possible order, or is there a better way to handle
this?

Instead of relying on the collision to check the hexadecimal support, I can simply check the numbers in the output files. Using the collision was the shortest path, but I did not think about this issue.

I'll see if I can find something better, thanks for pointing this out!



reply via email to

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