summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorWill Estes <westes575@gmail.com>2014-06-14 15:18:38 -0400
committerWill Estes <westes575@gmail.com>2014-11-12 05:14:27 -0500
commit278d5246783f32865905c53864edb5b0e410a28b (patch)
tree4944af1270dee1736dd6b3b5a1a8cad75d56afb8 /tests
parent2d9cde08c72ac7b2cef908c3d006984a79bd997c (diff)
refactor cxx_basic test for new test suite layout
Diffstat (limited to 'tests')
-rw-r--r--tests/.gitignore2
-rw-r--r--tests/Makefile.am6
-rw-r--r--tests/cxx_basic.ll (renamed from tests/test-c++-basic/scanner.l)2
-rw-r--r--tests/cxx_basic.txt (renamed from tests/test-c++-basic/test.input)0
-rw-r--r--tests/test-c++-basic/.gitignore6
-rw-r--r--tests/test-c++-basic/Makefile.am45
6 files changed, 9 insertions, 52 deletions
diff --git a/tests/.gitignore b/tests/.gitignore
index 2576821..2a75e2b 100644
--- a/tests/.gitignore
+++ b/tests/.gitignore
@@ -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
diff --git a/tests/Makefile.am b/tests/Makefile.am
index c2e943b..1098c98 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -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
diff --git a/tests/test-c++-basic/scanner.l b/tests/cxx_basic.ll
index 48baf00..ddeb2a7 100644
--- a/tests/test-c++-basic/scanner.l
+++ b/tests/cxx_basic.ll
@@ -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/test.input b/tests/cxx_basic.txt
index 7288a40..7288a40 100644
--- a/tests/test-c++-basic/test.input
+++ b/tests/cxx_basic.txt
diff --git a/tests/test-c++-basic/.gitignore b/tests/test-c++-basic/.gitignore
deleted file mode 100644
index aa90b44..0000000
--- a/tests/test-c++-basic/.gitignore
+++ /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
index ccfc884..0000000
--- a/tests/test-c++-basic/Makefile.am
+++ /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) $<