1 /***************************************************************************
2 * Copyright (C) 2004 by Intra2net AG *
5 ***************************************************************************/
18 #include <cppunit/extensions/TestFactoryRegistry.h>
19 #include <cppunit/ui/text/TestRunner.h>
20 #include <cppunit/extensions/HelperMacros.h>
22 #include <command_client.hxx>
23 #include <client_wrapper.hxx>
24 #include <socket_wrapper.hxx>
31 using namespace libt2n;
32 using namespace CppUnit;
34 class testme : public command_client
38 testme(client_connection &x, long long a, long long b)
39 : command_client(x,100000,10000)
42 void helloworld(const std::string& text)
44 std::cout << "Hello world, " << text << std::endl;
48 typedef T2nSingletonWrapper<testme> wraptype;
51 std::auto_ptr<wraptype> wraptype::SingletonObject = std::auto_ptr<wraptype>();
54 std::auto_ptr<ConnectionWrapper> wraptype::WrappedConnection = std::auto_ptr<ConnectionWrapper>();
56 class test_wrapper : public TestFixture
58 CPPUNIT_TEST_SUITE(test_wrapper);
60 CPPUNIT_TEST(simple_wrap);
62 CPPUNIT_TEST_SUITE_END();
74 // t2n_exec(&testme::helloworld)("gurke");
76 CPPUNIT_ASSERT_EQUAL(true,true);
82 CPPUNIT_TEST_SUITE_REGISTRATION(test_wrapper);