From 537b806d7e48d4c1a47e805eefa3df9f2679fb60 Mon Sep 17 00:00:00 2001 From: "Fred L. Drake, Jr." Date: Fri, 28 Jan 2005 05:19:53 +0000 Subject: [PATCH] test using Expat from C++ (closes SF bug #1006708) --- expat/Makefile.in | 11 +++++++++-- expat/tests/.gitignore | 1 + expat/tests/runtestspp.cpp | 6 ++++++ 3 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 expat/tests/runtestspp.cpp diff --git a/expat/Makefile.in b/expat/Makefile.in index 3452644c..8d1847ff 100644 --- a/expat/Makefile.in +++ b/expat/Makefile.in @@ -58,7 +58,8 @@ clean: cd lib && rm -f $(LIBRARY) *.o *.lo && rm -rf .libs _libs cd xmlwf && rm -f xmlwf *.o *.lo && rm -rf .libs _libs cd examples && rm -f elements outline *.o *.lo && rm -rf .libs _libs - cd tests && rm -rf .libs runtests runtests.o chardata.o + cd tests && rm -rf .libs runtests runtests.o runtestspp runtestspp.o + cd tests && rm -f chardata.o minicheck.o rm -rf .libs libexpat.la rm -f examples/core tests/core xmlwf/core @@ -72,8 +73,9 @@ extraclean: distclean rm -f expat_config.h.in configure rm -f conftools/ltconfig conftools/ltmain.sh conftools/libtool.m4 -check: tests/runtests +check: tests/runtests tests/runtestspp tests/runtests + tests/runtestspp install: xmlwf/xmlwf installlib $(mkinstalldirs) $(INSTALL_ROOT)$(bindir) $(INSTALL_ROOT)$(man1dir) @@ -112,9 +114,11 @@ VSNFLAG = -version-info @LIBCURRENT@:@LIBREVISION@:@LIBAGE@ LTFLAGS = --silent COMPILE = $(CC) $(INCLUDES) $(CFLAGS) $(DEFS) $(CPPFLAGS) +CXXCOMPILE = $(CXX) $(INCLUDES) $(CFLAGS) $(DEFS) $(CPPFLAGS) LTCOMPILE = $(LIBTOOL) $(LTFLAGS) --mode=compile $(COMPILE) LINK_LIB = $(LIBTOOL) $(LTFLAGS) --mode=link $(COMPILE) -no-undefined $(VSNFLAG) -rpath $(libdir) $(LDFLAGS) -o $@ LINK_EXE = $(LIBTOOL) $(LTFLAGS) --mode=link $(COMPILE) $(LDFLAGS) -o $@ +LINK_CXX_EXE = $(LIBTOOL) $(LTFLAGS) --mode=link $(CXXCOMPILE) $(LDFLAGS) -o $@ LIB_OBJS = lib/xmlparse.lo lib/xmltok.lo lib/xmlrole.lo $(LIBRARY): $(LIB_OBJS) @@ -153,6 +157,9 @@ tests/minicheck.o: tests/minicheck.c tests/minicheck.h tests/runtests.o: tests/runtests.c tests/chardata.h tests/runtests: tests/runtests.o tests/chardata.o tests/minicheck.o $(LIBRARY) $(LINK_EXE) $^ +tests/runtestspp.o: tests/runtestspp.cpp tests/chardata.h +tests/runtestspp: tests/runtestspp.o tests/chardata.o tests/minicheck.o $(LIBRARY) + $(LINK_CXX_EXE) $^ tests/xmlts.zip: wget --output-document=tests/xmlts.zip \ diff --git a/expat/tests/.gitignore b/expat/tests/.gitignore index 4542fcf6..7cec7b52 100644 --- a/expat/tests/.gitignore +++ b/expat/tests/.gitignore @@ -1,5 +1,6 @@ Makefile runtests +runtestspp xmlts.zip XML-Test-Suite .libs diff --git a/expat/tests/runtestspp.cpp b/expat/tests/runtestspp.cpp new file mode 100644 index 00000000..c35dc583 --- /dev/null +++ b/expat/tests/runtestspp.cpp @@ -0,0 +1,6 @@ +// C++ compilation harness for the test suite. +// +// This is used to ensure the Expat headers can be included from C++ +// and have everything work as expected. +// +#include "runtests.c" -- 2.40.0