senfscons: Much improved install implementation
[senf.git] / Utils / Buffer.test.cc
similarity index 64%
rename from Socket/Protocols/GenericSockAddr.cci
rename to Utils/Buffer.test.cc
index 3aa05af..a5d9d4e 100644 (file)
@@ -1,4 +1,6 @@
-// Copyright (C) 2007
+// $Id$
+//
+// Copyright (C) 2007 
 // Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS)
 // Kompetenzzentrum fuer Satelitenkommunikation (SatCom)
 //     Stefan Bund <g0dil@berlios.de>
 // 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
 /** \file
-    \brief GenericSockAddr inline non-template implementation */
+    \brief Buffer.test unit tests */
+
+//#include "Buffer.test.hh"
+//#include "Buffer.test.ih"
 
 // Custom includes
+#include "Buffer.hh"
 
-#define prefix_ inline
-///////////////////////////////cci.p///////////////////////////////////////
+#include <boost/test/auto_unit_test.hpp>
+#include <boost/test/test_tools.hpp>
 
-prefix_ senf::GenericSockAddr::GenericSockAddr()
-{}
+#define prefix_
+///////////////////////////////cc.p////////////////////////////////////////
 
-prefix_ struct sockaddr * senf::GenericSockAddr::sockaddr_p()
+BOOST_AUTO_UNIT_TEST(buffer)
 {
-    return reinterpret_cast<sockaddr *>(&addr_);
-}
+    int size (128);
 
-prefix_ struct sockaddr const * senf::GenericSockAddr::sockaddr_p()
-    const
-{
-    return reinterpret_cast<sockaddr const *>(&addr_);
+    // Just check for compile errors, the rest can't be checked
+    SENF_SCOPED_BUFFER(char, buf, size);
+    (void) buf;
 }
 
-prefix_ unsigned senf::GenericSockAddr::sockaddr_len()
-    const
-{
-    return sizeof(addr_);
-}
-
-///////////////////////////////cci.e///////////////////////////////////////
+///////////////////////////////cc.e////////////////////////////////////////
 #undef prefix_
 
 \f
 // Local Variables:
 // mode: c++
 // fill-column: 100
+// comment-column: 40
 // c-file-style: "senf"
 // indent-tabs-mode: nil
 // ispell-local-dictionary: "american"
 // compile-command: "scons -u test"
-// comment-column: 40
 // End: