Update of /cvsroot/pclasses/pclasses2/test
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1355/test
Modified Files:
FactoryTest.cpp Makefile.toc
Log Message:
more tests...
Index: FactoryTest.cpp
===================================================================
RCS file: /cvsroot/pclasses/pclasses2/test/FactoryTest.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- FactoryTest.cpp 24 Dec 2004 12:44:03 -0000 1.2
+++ FactoryTest.cpp 24 Dec 2004 19:26:41 -0000 1.3
@@ -8,6 +8,7 @@
#include <cassert>
#include <pclasses/Factory.h>
+#include <pclasses/Plugin/Plugin.h>
#ifndef CERR
@@ -86,11 +87,23 @@
TheBase * a = 0;
-#define LOAD(CN) a = P::CL::classload<TheBase>( CN ); \
- CERR << CN << " loaded? == " << a << "\n"; \
+#define CLOAD(CN) a = P::CL::classload<TheBase>( CN ); \
+ CERR << CN << " classload()ed? == " << a << "\n"; \
if( a ) CERR << "classname="<<a->classname()<<"\n"; \
delete( a ); a = 0;
+ /*************************
+Can't test until linking the libpclasses_xxx works.
+ typedef P::Plugin::PluginManager<TheBase> PM;
+ PM & pm = PM::instance();
+#define PLOAD(CN) a = pm.create( CN ); \
+ CERR << CN << " plugin-create()ed? == " << a << "\n"; \
+ if( a ) CERR << "classname="<<a->classname()<<"\n"; \
+ delete( a ); a = 0;
+ *************************/
+
+#define LOAD(CN) CLOAD(CN)
+
LOAD("TheBase");
LOAD("AType");
LOAD("BType");
Index: Makefile.toc
===================================================================
RCS file: /cvsroot/pclasses/pclasses2/test/Makefile.toc,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- Makefile.toc 23 Dec 2004 20:12:41 -0000 1.2
+++ Makefile.toc 24 Dec 2004 19:26:41 -0000 1.3
@@ -29,6 +29,7 @@
ifeq (1,$(build_bins))
BIN_PROGRAMS = FactoryTest
FactoryTest_bin_OBJECTS = FactoryTest.o
+# $(top_srcdir)/src/System/PathFinder.o $(wildcard $(top_srcdir)/src/System/SharedLib*.o)
include $(TOC_MAKESDIR)/BIN_PROGRAMS.make
# INSTALL_BINS += $(BIN_PROGRAMS)
# Run target BIN_PROGRAMS to build these.
|