]> granicus.if.org Git - flex/commitdiff
refactor cxx_multiple_scanners test for new test suite layout
authorWill Estes <westes575@gmail.com>
Sun, 15 Jun 2014 01:12:47 +0000 (21:12 -0400)
committerWill Estes <westes575@gmail.com>
Wed, 12 Nov 2014 10:14:27 +0000 (05:14 -0500)
tests/.gitignore
tests/Makefile.am
tests/cxx_multiple_scanners.txt [moved from tests/test-c++-multiple-scanners/test.input with 100% similarity]
tests/cxx_multiple_scanners_1.ll [moved from tests/test-c++-multiple-scanners/scanner-1.l with 96% similarity]
tests/cxx_multiple_scanners_2.ll [moved from tests/test-c++-multiple-scanners/scanner-2.l with 96% similarity]
tests/cxx_multiple_scanners_main.cc [moved from tests/test-c++-multiple-scanners/main.cpp with 100% similarity]
tests/test-c++-multiple-scanners/.gitignore [deleted file]
tests/test-c++-multiple-scanners/Makefile.am [deleted file]

index 363c9d10b90608181a9b4fff1488f2ac58b7fbbb..bd9304c2114398c5b53993455247f8e33234fd0f 100644 (file)
@@ -28,6 +28,8 @@ ccl
 ccl.c
 cxx_basic
 cxx_basic.cc
+cxx_multiple_scanners
+cxx_multiple_scanners_[12].cc
 debug_nr
 debug_nr.c
 debug_r
index 5691e0c2297f1f0281846dbf401c877cd9f5fdc3..d22d5a2e69be46aff817f0cf8ff625552fcde548 100644 (file)
@@ -39,6 +39,7 @@ check_PROGRAMS = \
        c_cxx_r \
        ccl \
        cxx_basic \
+       cxx_multiple_scanners \
        debug_nr \
        debug_r \
        extended \
@@ -69,6 +70,7 @@ c_cxx_nr_SOURCES = c_cxx_nr.lll
 c_cxx_r_SOURCES = c_cxx_r.lll
 ccl_SOURCES = ccl.l
 cxx_basic_SOURCES = cxx_basic.ll
+cxx_multiple_scanners_SOURCES = cxx_multiple_scanners_main.cc cxx_multiple_scanners_1.ll cxx_multiple_scanners_2.ll
 debug_nr_SOURCES = debug_nr.l
 debug_r_SOURCES = debug_r.l
 extended_SOURCES = extended.l
@@ -120,6 +122,7 @@ basic_nr.txt \
        c_cxx_r.txt \
        ccl.txt \
        cxx_basic.txt \
+       cxx_multiple_scanners.txt \
        debug_nr.txt \
        debug_r.txt \
        extended.txt \
similarity index 96%
rename from tests/test-c++-multiple-scanners/scanner-1.l
rename to tests/cxx_multiple_scanners_1.ll
index 38cc5d7c166a60250084be0c0d0c2d04cfb154e8..f4adb9d89b3bac4ab66847c7675b73d6778bbdd1 100644 (file)
@@ -24,7 +24,7 @@
 
 %}
 
-%option 8bit outfile="scanner-1.cpp" prefix="S1_"
+%option 8bit prefix="S1_"
 %option nounput nomain noyywrap
 %option warn stack noyy_top_state
 
similarity index 96%
rename from tests/test-c++-multiple-scanners/scanner-2.l
rename to tests/cxx_multiple_scanners_2.ll
index 15faf26fb33c660f4ce0065ccc22ea59bc784f62..d84c5303ce6b55f54629e04cc29c3b3b15a7c594 100644 (file)
@@ -24,7 +24,7 @@
 
 %}
 
-%option 8bit outfile="scanner-2.cpp" prefix="S2_"
+%option 8bit prefix="S2_"
 %option nounput nomain
 %option warn stack noyy_top_state
 
diff --git a/tests/test-c++-multiple-scanners/.gitignore b/tests/test-c++-multiple-scanners/.gitignore
deleted file mode 100644 (file)
index ed9376c..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-Makefile
-Makefile.in
-scanner-1.cpp
-scanner-2.cpp
-OUTPUT
-.deps
-test-c++-multiple-scanners
diff --git a/tests/test-c++-multiple-scanners/Makefile.am b/tests/test-c++-multiple-scanners/Makefile.am
deleted file mode 100644 (file)
index 9bcc9f8..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-# This file is part of flex.
-
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-
-# 1. Redistributions of source code must retain the above copyright
-#    notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-#    notice, this list of conditions and the following disclaimer in the
-#    documentation and/or other materials provided with the distribution.
-
-# Neither the name of the University nor the names of its contributors
-# may be used to endorse or promote products derived from this software
-# without specific prior written permission.
-
-# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
-# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-# PURPOSE.
-
-
-FLEX = $(top_builddir)/flex
-builddir = @builddir@
-
-EXTRA_DIST = scanner-1.l scanner-2.l main.cpp test.input
-CLEANFILES = scanner-1.cpp $(testname)$(EXEEXT) OUTPUT $(OBJS) scanner-2.cpp
-OBJS = scanner-1.o scanner-2.o main.o
-
-AM_CXXFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir)
-#LDFLAGS = $(top_srcdir)/libfl.a 
-#YFLAGS = --defines --output=parser.c
-
-testname = test-c++-multiple-scanners
-
-scanner-1.cpp: $(srcdir)/scanner-1.l
-       $(FLEX) -+ $(LFLAGS) $<
-
-scanner-2.cpp: $(srcdir)/scanner-2.l
-       $(FLEX) -+ $(LFLAGS) $<
-
-$(testname)$(EXEEXT): $(OBJS)
-       $(CXX) $(CXXFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES)
-
-test: $(testname)$(EXEEXT)
-       $(builddir)/$(testname)$(EXEEXT) < $(srcdir)/test.input
-
-.cpp.o:
-       $(CXX) -c -o $@ $(AM_CXXFLAGS) $(CPPFLAGS) $(CXXFLAGS) $<
-
-main.o: scanner-1.h scanner-2.h
-scanner-1.h: scanner-1.cpp
-scanner-2.h: scanner-2.cpp