summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJohn Millaway <john43@users.sourceforge.net>2002-09-05 18:12:36 +0000
committerJohn Millaway <john43@users.sourceforge.net>2002-09-05 18:12:36 +0000
commit5582703c86e2a817f391a807b868610d0cf6db9a (patch)
tree59153dc576014b098a63b651a4833ffc353676ab /tests
parent8fe1b00ad642b226055a953a4a3702d143fca1b9 (diff)
Added serialization test to table-opts test.
Diffstat (limited to 'tests')
-rw-r--r--tests/test-table-opts/.cvsignore1
-rw-r--r--tests/test-table-opts/Makefile.am20
2 files changed, 18 insertions, 3 deletions
diff --git a/tests/test-table-opts/.cvsignore b/tests/test-table-opts/.cvsignore
index 91ff750..56e3afe 100644
--- a/tests/test-table-opts/.cvsignore
+++ b/tests/test-table-opts/.cvsignore
@@ -6,3 +6,4 @@ TEMPLATE
OUTPUT
.deps
test-opt-*
+test-ser-*
diff --git a/tests/test-table-opts/Makefile.am b/tests/test-table-opts/Makefile.am
index d92fc5f..8e30641 100644
--- a/tests/test-table-opts/Makefile.am
+++ b/tests/test-table-opts/Makefile.am
@@ -22,6 +22,8 @@
# ------------------------------------------------
# This test is really a set of tests, one for
# each compression flag. -Ca, -Cem, etc..
+# Then we test the serializalization mechanism.
+# THEN we compare the serialized tables to the non-serialized.
# ------------------------------------------------
BISON = @BISON@
@@ -29,17 +31,20 @@ FLEX = $(top_builddir)/flex
testname := test-table-opts
allopts := -Ca -Ce -Cf -CF -Cm -Cem -Cae -Caf -CaF -Cam -Caem
-alltests := $(foreach opt,$(allopts),test-opt-r$(opt) test-opt-nr$(opt))
+variations := opt-nr opt-r ser-nr ser-r
+alltests := $(foreach opt,$(allopts), $(foreach vari,$(variations),test-$(vari)$(opt)))
alltestexe := $(addsuffix $(EXEEXT),$(alltests))
alltestsrc := $(addsuffix .c,$(alltests))
alltestobj := $(addsuffix .o,$(alltests))
+alltables := $(addsuffix .tables,$(alltests))
EXTRA_DIST = scanner.l test.input
-CLEANFILES = scanner.c OUTPUT $(alltestobj) $(alltestsrc) $(alltestexe)
+CLEANFILES = scanner.c OUTPUT $(alltestobj) $(alltestsrc) $(alltestexe)\
+ $(alltables)
INCLUDES = -I $(srcdir) -I $(top_srcdir) -I $(top_builddir) -I .
-test-table-opts: $(alltests)
+test-table-opts: $(alltests) comparison_test
test-opt-r%.c: $(srcdir)/scanner.l
$(FLEX) --reentrant $* -o $@ $<
@@ -47,9 +52,18 @@ test-opt-r%.c: $(srcdir)/scanner.l
test-opt-nr%.c: $(srcdir)/scanner.l
$(FLEX) $* -o $@ $<
+test-ser-r%.c: $(srcdir)/scanner.l
+ $(FLEX) --reentrant --tables-file="test-ser-r$*.tables" $* -o $@ $<
+
+test-ser-nr%.c: $(srcdir)/scanner.l
+ $(FLEX) --tables-file="test-ser-nr$*.tables" $* -o $@ $<
+
test-opt%$(EXEEXT): test-opt%.o
$(CC) -o $@ $(LDFLAGS) $< $(LOADLIBES)
+test-ser%$(EXEEXT): test-ser%.o
+ $(CC) -o $@ $(LDFLAGS) $< $(LOADLIBES)
+
test: $(alltestexe)
for t in $(alltestexe) ; do \
./$$t < $(srcdir)/test.input || exit 1 ; \