]> granicus.if.org Git - flex/commitdiff
refactor cxx_basic test for new test suite layout
authorWill Estes <westes575@gmail.com>
Sat, 14 Jun 2014 19:18:38 +0000 (15:18 -0400)
committerWill Estes <westes575@gmail.com>
Wed, 12 Nov 2014 10:14:27 +0000 (05:14 -0500)
tests/.gitignore
tests/Makefile.am
tests/cxx_basic.ll [moved from tests/test-c++-basic/scanner.l with 96% similarity]
tests/cxx_basic.txt [moved from tests/test-c++-basic/test.input with 100% similarity]
tests/test-c++-basic/.gitignore [deleted file]
tests/test-c++-basic/Makefile.am [deleted file]

index 2576821dac4aa1e9b531464100d66fd6690cb459..2a75e2b777d3bafc498b3e71b1ab5f4c538a670d 100644 (file)
@@ -22,6 +22,8 @@ bison_yylval_parser.[ch]
 bison_yylval_scanner.[ch]
 ccl
 ccl.c
+cxx_basic
+cxx_basic.cc
 debug_nr
 debug_nr.c
 debug_r
index c2e943b164d5699424f7dfb9443155273b1273dd..1098c98ee08c0a528fadf8d0374c16de68972791 100644 (file)
@@ -36,6 +36,7 @@ check_PROGRAMS = \
        bison_yylloc \
        bison_yylval \
        ccl \
+       cxx_basic \
        debug_nr \
        debug_r \
        extended \
@@ -63,6 +64,7 @@ bison_nr_SOURCES = bison_nr_scanner.l bison_nr_parser.y bison_nr_main.c
 bison_yylloc_SOURCES = bison_yylloc_scanner.l bison_yylloc_parser.y bison_yylloc_main.c
 bison_yylval_SOURCES = bison_yylval_scanner.l bison_yylval_parser.y bison_yylval_main.c
 ccl_SOURCES = ccl.l
+cxx_basic_SOURCES = cxx_basic.ll
 debug_nr_SOURCES = debug_nr.l
 debug_r_SOURCES = debug_r.l
 extended_SOURCES = extended.l
@@ -106,6 +108,7 @@ basic_nr.txt \
        bison_yylloc.txt \
        bison_yylval_scanner.h \
        bison_yylval.txt \
+       cxx_basic.txt \
        ccl.txt \
        debug_nr.txt \
        debug_r.txt \
@@ -131,6 +134,9 @@ FLEX = $(top_builddir)/src/flex
 .l.c:
        $(FLEX) -o $@ $<
 
+.ll.cc:
+       $(FLEX) -+ -o $@ $<
+
 bison_nr_main($objext): bison_nr_parser.h bison_nr_scanner.h
 bison_nr_scanner.h: bison_nr_scanner.c
 
similarity index 96%
rename from tests/test-c++-basic/scanner.l
rename to tests/cxx_basic.ll
index 48baf006266f7e43707c07aa15682d27048f071a..ddeb2a7d0583d23ba6232b8a71460a5d6f349459 100644 (file)
@@ -27,7 +27,7 @@
 
 %}
 
-%option 8bit outfile="scanner.cpp" prefix="test"
+%option 8bit prefix="test"
 %option nounput nomain noyywrap 
 %option warn c++
 
diff --git a/tests/test-c++-basic/.gitignore b/tests/test-c++-basic/.gitignore
deleted file mode 100644 (file)
index aa90b44..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-Makefile
-Makefile.in
-scanner.cpp
-OUTPUT
-.deps
-test-c++-basic
diff --git a/tests/test-c++-basic/Makefile.am b/tests/test-c++-basic/Makefile.am
deleted file mode 100644 (file)
index ccfc884..0000000
+++ /dev/null
@@ -1,45 +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
-
-EXTRA_DIST = scanner.l test.input
-CLEANFILES = scanner.cpp scanner.h $(testname)$(EXEEXT) OUTPUT $(OBJS)
-OBJS = scanner.o
-
-AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir)
-LFLAGS = -+
-#LDFLAGS = 
-
-testname = test-c++-basic
-
-scanner.cpp: $(srcdir)/scanner.l
-       $(FLEX) $(LFLAGS) $<
-
-$(testname)$(EXEEXT): $(OBJS)
-       $(CXX) $(CXXFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES)
-
-test: $(testname)$(EXEEXT)
-       ./$(testname)$(EXEEXT) < $(srcdir)/test.input
-
-.cpp.o:
-       $(CXX) $(CXXFLAGS) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $<