]> granicus.if.org Git - flex/commitdiff
Added serialization test to table-opts test.
authorJohn Millaway <john43@users.sourceforge.net>
Thu, 5 Sep 2002 18:12:36 +0000 (18:12 +0000)
committerJohn Millaway <john43@users.sourceforge.net>
Thu, 5 Sep 2002 18:12:36 +0000 (18:12 +0000)
tests/test-table-opts/.cvsignore
tests/test-table-opts/Makefile.am

index 91ff750556cd7b133e9d260e6c0aedabee87d154..56e3afe83b6be21e2a9b25958c6926ddb6280672 100644 (file)
@@ -6,3 +6,4 @@ TEMPLATE
 OUTPUT
 .deps
 test-opt-*
+test-ser-*
index d92fc5f270493c5b3756277b762717d7efbe40e6..8e306410f1dad01e3dbd898e70c5eb8c881f63bd 100644 (file)
@@ -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 ; \