]> git.saurik.com Git - bison.git/blob - tests/testsuite.at
* configure.ac (GXX): Rename as...
[bison.git] / tests / testsuite.at
1 # Process this file with autom4te to create testsuite. -*- Autotest -*-
2
3 # Test suite for GNU Bison.
4 # Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
5
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2, or (at your option)
9 # any later version.
10
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
15
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software
18 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
19 # 02111-1307, USA.
20
21 # We need a recent Autotest.
22 m4_version_prereq([2.52g])
23
24
25 # AT_DATA_GRAMMAR_PROLOGUE
26 # ------------------------
27 # The prologue that should be included in any grammar which parser is
28 # meant to be compiled.
29 m4_define([AT_DATA_GRAMMAR_PROLOGUE],
30 [[%{
31 #if HAVE_CONFIG_H
32 # include <config.h>
33 /* We don't need perfect functions for these tests. */
34 # undef malloc
35 # undef memcmp
36 # undef realloc
37 #endif
38 %}]
39 ])
40
41
42 # AT_DATA_GRAMMAR(NAME, CONTENT)
43 # ------------------------------
44 # Generate the file NAME, which CONTENT is preceded by
45 # AT_DATA_GRAMMAR_PROLOGUE.
46 m4_define([AT_DATA_GRAMMAR],
47 [AT_DATA([$1],
48 [AT_DATA_GRAMMAR_PROLOGUE
49 $2])
50 ])
51
52
53 # AT_COMPILE(OUTPUT, [SOURCES = OUTPUT.c])
54 # ----------------------------------------
55 m4_define([AT_COMPILE],
56 [AT_CHECK([$CC $CFLAGS $CPPFLAGS m4_default([$2], [$1.c]) -o $1], 0,
57 [], [ignore])])
58
59
60 # AT_COMPILE_CXX(OUTPUT, [SOURCES = OUTPUT.c])
61 # --------------------------------------------
62 m4_define([AT_COMPILE_CXX],
63 [AT_CHECK([$CXX $CFLAGS $CPPFLAGS m4_default([$2], [$1.c]) -o $1], 0,
64 [], [ignore])])
65
66
67 # AT_PARSER_CHECK(COMMAND, EXIT-STATUS, EXPOUT, EXPERR)
68 # -----------------------------------------------------
69 # So that we can run `./testsuite PREPARSER='valgrind -q' for instance.
70 m4_define([AT_PARSER_CHECK],
71 [AT_CHECK([$PREPARSER $1], [$2], [$3], [$4])])
72
73 AT_INIT
74
75 AT_TESTED([bison])
76
77 # Testing resistance to user bugs.
78 m4_include([input.at])
79
80 # Testing output file names.
81 m4_include([output.at])
82
83 # Testing the part of the engine that computes FOLLOW etc.
84 m4_include([sets.at])
85
86 # Testing grammar reduction.
87 m4_include([reduce.at])
88
89 # Testing that #lines are correct.
90 m4_include([synclines.at])
91
92 # Testing that headers are sane.
93 m4_include([headers.at])
94
95 # Testing that user actions are properly performed.
96 m4_include([actions.at])
97
98 # Testing conflicts detection and resolution.
99 m4_include([conflicts.at])
100
101 # Fulling testing (compilation and execution of the parser) on calc.
102 m4_include([calc.at])
103
104 # Huge artificial grammars.
105 # Torturing the stack expansion at runtime.
106 m4_include([torture.at])
107
108 # Checking big, real world grammars.
109 m4_include([existing.at])
110
111 # Some old bugs.
112 m4_include([regression.at])
113
114 # GLR tests:
115 # C++ types, simplified
116 m4_include([cxx-type.at])
117 # Regression tests
118 m4_include([glr-regression.at])