// $Id$
//
-// Copyright (C) 2006
-// Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS)
-// Kompetenzzentrum fuer Satelitenkommunikation (SatCom)
-// Stefan Bund <stefan.bund@fokus.fraunhofer.de>
+// Copyright (C) 2006
+// Fraunhofer Institute for Open Communication Systems (FOKUS)
+// Competence Center NETwork research (NET), St. Augustin, GERMANY
+// Stefan Bund <g0dil@berlios.de>
//
// 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
#include "SocketProtocol.test.hh"
#include "AddressingPolicy.hh"
-#include <boost/test/auto_unit_test.hpp>
+#include "../Utils/auto_unit_test.hh"
#include <boost/test/test_tools.hpp>
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
namespace {
-
+
namespace sl = senf;
-
+
class MySocketHandle
: public sl::ServerSocketHandle<sl::test::SomeProtocol::Policy>
{
sl::test::SomeWritePolicy
>::policy OtherSocketPolicy;
typedef sl::SocketHandle<OtherSocketPolicy> OtherSocketHandle;
-
+
MySocketHandle myh;
OtherSocketHandle osh (myh);
osh = myh;
senf::NoAddressingPolicy
>::policy> SomeOtherSocketHandle;
typedef sl::ClientSocketHandle<OtherSocketPolicy> OtherClientHandle;
-
+
BOOST_CHECK_NO_THROW( sl::dynamic_socket_cast<SomeSocketHandle>(osh) );
BOOST_CHECK_THROW( sl::dynamic_socket_cast<SomeOtherSocketHandle>(osh),
std::bad_cast );
MySocketHandle::ClientSocketHandle client = myh.accept();
BOOST_CHECK_EQUAL( client.fd(), -1 );
}
-
+
}
\f
// 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: