From: Adam Dickmeiss Date: Fri, 3 Dec 2004 15:50:53 +0000 (+0000) Subject: Added test program for the use of CDetails object from USEMARCON. X-Git-Tag: YAZPROXY.0.9~19 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=aa1ce475fe15391b9a3d4644495199fb59ad2ca6;p=yazproxy-moved-to-github.git Added test program for the use of CDetails object from USEMARCON. --- 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); +}