From aa1ce475fe15391b9a3d4644495199fb59ad2ca6 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Fri, 3 Dec 2004 15:50:53 +0000 Subject: [PATCH] Added test program for the use of CDetails object from USEMARCON. --- src/Makefile.am | 6 +++++- src/cdetails.cpp | 26 ++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 src/cdetails.cpp diff --git a/src/Makefile.am b/src/Makefile.am index 86142f9..e4502df 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,4 +1,4 @@ -## $Id: Makefile.am,v 1.3 2004-12-03 14:28:18 adam Exp $ +## $Id: Makefile.am,v 1.4 2004-12-03 15:50:53 adam Exp $ AM_CXXFLAGS = $(YAZPPINC) -I$(srcdir)/../include $(XSLT_CFLAGS) $(USEMARCONINC) @@ -9,8 +9,12 @@ libyazproxy_la_SOURCES= yaz-proxy.cpp yaz-proxy-config.cpp yaz-bw.cpp \ proxyp.h yaz-usemarcon.cpp bin_PROGRAMS = yazproxy +check_PROGRAMS = cdetails + +TESTS=$(check_PROGRAMS) yazproxy_SOURCES=yaz-proxy-main.cpp +cdetails_SOURCES=cdetails.cpp LDADD=libyazproxy.la $(YAZPPLALIB) $(XSLT_LIBS) $(USEMARCONLALIB) libyazproxy_la_LIBADD = $(XSLT_LIBS) diff --git a/src/cdetails.cpp b/src/cdetails.cpp new file mode 100644 index 0000000..aa90157 --- /dev/null +++ b/src/cdetails.cpp @@ -0,0 +1,26 @@ +#include +#include +#include + +#if HAVE_USEMARCON +#include + +CDetails *x(CDetails *p) +{ + return p; +} +#endif + +int main(int argc, char **argv) +{ +#if HAVE_USEMARCON + CDetails local; + CDetails *ptr = new CDetails(); + + x(&local); + x(ptr); + + delete ptr; +#endif + exit(0); +} -- 1.7.10.4