X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Socket%2FProtocolServerSocketHandle.test.cc;h=9a3913ff6df537e75844b8c7d1826cd9842b25d8;hb=f2f5d59e83863f3b513950173baee1b6da2aee3c;hp=e960e025db11e5780afdb944540541d54c0d5de3;hpb=c13146edc1b57cc60f102bcfd1a7a602ecec261f;p=senf.git diff --git a/Socket/ProtocolServerSocketHandle.test.cc b/Socket/ProtocolServerSocketHandle.test.cc index e960e02..9a3913f 100644 --- a/Socket/ProtocolServerSocketHandle.test.cc +++ b/Socket/ProtocolServerSocketHandle.test.cc @@ -1,9 +1,9 @@ // $Id$ // // Copyright (C) 2006 -// Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS) -// Kompetenzzentrum fuer Satelitenkommunikation (SatCom) -// Stefan Bund +// Fraunhofer Institute for Open Communication Systems (FOKUS) +// Competence Center NETwork research (NET), St. Augustin, GERMANY +// Stefan Bund // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -20,7 +20,8 @@ // Free Software Foundation, Inc., // 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// Unit tests +/** \file + \brief ProtocolServerSocketHandle unit tests */ //#include "ProtocolServerSocketHandle.test.hh" //#include "ProtocolServerSocketHandle.test.ih" @@ -29,7 +30,7 @@ #include "ProtocolServerSocketHandle.hh" #include "SocketProtocol.test.hh" -#include +#include "../Utils/auto_unit_test.hh" #include #define prefix_ @@ -37,16 +38,16 @@ namespace { - struct MyProtocol : public senf::test::SomeProtocol + struct MySocketProtocol : public senf::test::SomeSocketProtocol { - using senf::test::SomeProtocol::init_server; + using senf::test::SomeSocketProtocol::init_server; void init_server(char const *,unsigned) const {} }; } BOOST_AUTO_UNIT_TEST(protocolServerSocketHandle) { - typedef senf::ProtocolServerSocketHandle MySocketHandle; + typedef senf::ProtocolServerSocketHandle MySocketHandle; { typedef senf::MakeSocketPolicy< @@ -62,15 +63,15 @@ BOOST_AUTO_UNIT_TEST(protocolServerSocketHandle) OtherSocketHandle osh (h); h = senf::static_socket_cast(osh); - MySocketHandle::ClientSocketHandle client = h.accept(); + MySocketHandle::ClientHandle client = h.accept(); BOOST_CHECK_EQUAL( client.fd(), -1 ); BOOST_CHECK_EQUAL( h.dumpState(), "file.handle: -1\n" "file.refcount: 2\n" - "handle: senf::ProtocolServerSocketHandle<(anonymous namespace)::MyProtocol>\n" - "socket.policy: senf::SocketPolicy\n" - "socket.protocol: (anonymous namespace)::MyProtocol\n" + "handle: senf::ProtocolServerSocketHandle<(anonymous namespace)::MySocketProtocol>\n" + "socket.protocol: (anonymous namespace)::MySocketProtocol\n" + "socket.protocol.policy: senf::SocketPolicy\n" "socket.server: true\n" ); } @@ -90,4 +91,6 @@ BOOST_AUTO_UNIT_TEST(protocolServerSocketHandle) // c-file-style: "senf" // indent-tabs-mode: nil // ispell-local-dictionary: "american" +// compile-command: "scons -u test" +// comment-column: 40 // End: