X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Utils%2Fmembind.test.cc;h=14982ce65c308b180b15df6eafb4c0a1627d0404;hb=a1fdb7bb122f0b05be809a922d4b7ef5e125fa67;hp=7c0595494f262d6f5a3a91f09ff95bb7e2babf3f;hpb=c52cd7d87dbb525c1267aad27391b8b7365dbb57;p=senf.git diff --git a/Utils/membind.test.cc b/Utils/membind.test.cc index 7c05954..14982ce 100644 --- a/Utils/membind.test.cc +++ b/Utils/membind.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 membind unit tests */ //#include "membind.test.hh" //#include "membind.test.ih" @@ -28,22 +29,22 @@ // Custom includes #include #include -#include "Utils/membind.hh" +#include "membind.hh" -#include +#include "../Utils/auto_unit_test.hh" #include #define prefix_ ///////////////////////////////cc.p//////////////////////////////////////// namespace { - + struct Test { - char const * meth1() { + char const * meth1() { return "meth1()"; } - std::string meth2(int foo, int bar) { + std::string meth2(int foo, int bar) const { std::stringstream s; s << "meth2(" << foo << "," << bar << ")"; return s.str(); @@ -55,8 +56,8 @@ namespace { BOOST_AUTO_UNIT_TEST(membind) { Test instance; - boost::function f1 (satcom::lib::membind(&Test::meth1,instance)); - boost::function f2 (satcom::lib::membind(&Test::meth2,instance)); + boost::function f1 (senf::membind(&Test::meth1,instance)); + boost::function f2 (senf::membind(&Test::meth2,instance)); BOOST_CHECK_EQUAL( f1(), "meth1()" ); BOOST_CHECK_EQUAL( f2(1,2), "meth2(1,2)" ); @@ -68,5 +69,10 @@ BOOST_AUTO_UNIT_TEST(membind) // 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: