Socket: Introduce sub-directory structure for concrete protocols
[senf.git] / Socket / Protocols / main.test.cc
similarity index 62%
rename from Socket/PacketSocketHandle.ct
rename to Socket/Protocols/main.test.cc
index 5a6eb0c..91e601d 100644 (file)
@@ -1,4 +1,4 @@
-// $Id$
+// $Id: main.test.cc 296 2007-07-10 20:39:34Z g0dil $
 //
 // Copyright (C) 2006
 // Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS)
 // Free Software Foundation, Inc.,
 // 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
-/** \file
-    \brief PacketProtocol and PacketSocketHandle non-inline template implementation
- */
+// Definition of non-inline non-template functions
 
-#include "PacketSocketHandle.ih"
+//#include "test.hh"
+//#include "test.ih"
 
 // Custom includes
+#define BOOST_AUTO_TEST_MAIN
+#include <boost/test/auto_unit_test.hpp>
+#include <boost/test/test_tools.hpp>
 
 #define prefix_
-///////////////////////////////ct.p////////////////////////////////////////
+///////////////////////////////cc.p////////////////////////////////////////
 
-template <class ForwardRange>
-prefix_ unsigned
-senf::detail::Range_LLAddressCopier<ForwardRange>::operator()(unsigned char * target)
-    const
-{
-    std::size_t len (0);
-    typename boost::range_const_iterator<ForwardRange>::type i (boost::begin(range_));
-    for (; i != boost::end(range_) && len<8; ++i, ++len, ++target)
-        *target = *i;
-    if (i != boost::end(range_))
-        throw InvalidLLSocketAddressException();
-    return len;
-}
 
-///////////////////////////////ct.e////////////////////////////////////////
+///////////////////////////////cc.e////////////////////////////////////////
 #undef prefix_
 
 \f