X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Socket%2FProtocolServerSocketHandle.test.cc;h=9a3913ff6df537e75844b8c7d1826cd9842b25d8;hb=bd9f9d3fd6fbcff0112a7bf48ab9284da9576b11;hp=7dff657f27e1d2448ca0b55f976fdd95ef441874;hpb=ac6a813d9d99f7add4e13aff7a4bcd314d5604a6;p=senf.git diff --git a/Socket/ProtocolServerSocketHandle.test.cc b/Socket/ProtocolServerSocketHandle.test.cc index 7dff657..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 +// Copyright (C) 2006 +// 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< @@ -61,16 +62,16 @@ 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(), - "handle: senf::ProtocolServerSocketHandle<(anonymous namespace)::MyProtocol>\n" "file.handle: -1\n" "file.refcount: 2\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" ); } @@ -86,5 +87,10 @@ BOOST_AUTO_UNIT_TEST(protocolServerSocketHandle) // Local Variables: // mode: c++ +// fill-column: 100 // c-file-style: "senf" +// indent-tabs-mode: nil +// ispell-local-dictionary: "american" +// compile-command: "scons -u test" +// comment-column: 40 // End: