X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Socket%2FProtocolServerSocketHandle.test.cc;h=9a3913ff6df537e75844b8c7d1826cd9842b25d8;hb=bd9f9d3fd6fbcff0112a7bf48ab9284da9576b11;hp=22b6cb4a589792c896fb9ac6929e283598aed8d9;hpb=c52cd7d87dbb525c1267aad27391b8b7365dbb57;p=senf.git diff --git a/Socket/ProtocolServerSocketHandle.test.cc b/Socket/ProtocolServerSocketHandle.test.cc index 22b6cb4..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,40 +38,40 @@ namespace { - struct MyProtocol : public satcom::lib::test::SomeProtocol + struct MySocketProtocol : public senf::test::SomeSocketProtocol { - using satcom::lib::test::SomeProtocol::init_server; + using senf::test::SomeSocketProtocol::init_server; void init_server(char const *,unsigned) const {} }; } BOOST_AUTO_UNIT_TEST(protocolServerSocketHandle) { - typedef satcom::lib::ProtocolServerSocketHandle MySocketHandle; + typedef senf::ProtocolServerSocketHandle MySocketHandle; { - typedef satcom::lib::MakeSocketPolicy< - satcom::lib::test::SomeFramingPolicy, - satcom::lib::test::SomeReadPolicy, - satcom::lib::test::SomeWritePolicy + typedef senf::MakeSocketPolicy< + senf::test::SomeFramingPolicy, + senf::test::SomeReadPolicy, + senf::test::SomeWritePolicy >::policy OtherSocketPolicy; - typedef satcom::lib::SocketHandle OtherSocketHandle; + typedef senf::SocketHandle OtherSocketHandle; MySocketHandle h; h.protocol(); OtherSocketHandle osh (h); - h = satcom::lib::static_socket_cast(osh); - - MySocketHandle::ClientSocketHandle client = h.accept(); + h = senf::static_socket_cast(osh); + + MySocketHandle::ClientHandle client = h.accept(); BOOST_CHECK_EQUAL( client.fd(), -1 ); BOOST_CHECK_EQUAL( h.dumpState(), - "handle: satcom::lib::ProtocolServerSocketHandle<(anonymous namespace)::MyProtocol>\n" "file.handle: -1\n" "file.refcount: 2\n" - "socket.policy: satcom::lib::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++ -// c-file-style: "satcom" +// fill-column: 100 +// c-file-style: "senf" +// indent-tabs-mode: nil +// ispell-local-dictionary: "american" +// compile-command: "scons -u test" +// comment-column: 40 // End: