4 // Fraunhofer Institute for Open Communication Systems (FOKUS)
5 // Competence Center NETwork research (NET), St. Augustin, GERMANY
6 // Stefan Bund <g0dil@berlios.de>
8 // This program is free software; you can redistribute it and/or modify
9 // it under the terms of the GNU General Public License as published by
10 // the Free Software Foundation; either version 2 of the License, or
11 // (at your option) any later version.
13 // This program is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 // GNU General Public License for more details.
18 // You should have received a copy of the GNU General Public License
19 // along with this program; if not, write to the
20 // Free Software Foundation, Inc.,
21 // 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24 \brief ProtocolClientSocketHandle unit tests */
26 //#include "ProtocolClientSocketHandle.test.hh"
27 //#include "ProtocolClientSocketHandle.test.ih"
30 #include "ProtocolClientSocketHandle.hh"
31 #include "SocketProtocol.test.hh"
33 #include <senf/Utils/auto_unit_test.hh>
34 #include <boost/test/test_tools.hpp>
37 ///////////////////////////////cc.p////////////////////////////////////////
40 struct MySocketProtocol : public senf::test::SomeSocketProtocol
42 using senf::test::SomeSocketProtocol::init_client;
43 void init_client(char const *,unsigned) const {}
47 BOOST_AUTO_UNIT_TEST(protocolClientSocketHandle)
49 typedef senf::ProtocolClientSocketHandle<MySocketProtocol> MySocketHandle;
52 typedef senf::MakeSocketPolicy<
53 senf::test::SomeFramingPolicy,
54 senf::test::SomeReadPolicy,
55 senf::test::SomeWritePolicy
56 >::policy OtherSocketPolicy;
57 typedef senf::SocketHandle<OtherSocketPolicy> OtherSocketHandle;
62 OtherSocketHandle osh (h);
63 h = senf::static_socket_cast<MySocketHandle>(osh);
67 MySocketHandle hh("foo.bar.c",1234);
71 ///////////////////////////////cc.e////////////////////////////////////////
78 // c-file-style: "senf"
79 // indent-tabs-mode: nil
80 // ispell-local-dictionary: "american"
81 // compile-command: "scons -u test"