X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Socket%2FFileHandle.test.cc;h=262bf0ce05fcf1f45d665206c76ed9dc86bd3cb4;hb=9a988902090d28007578e93bffd809f6bd913155;hp=c86a26b99aadefa1823be4e7e6e447f00bc31b63;hpb=c52cd7d87dbb525c1267aad27391b8b7365dbb57;p=senf.git diff --git a/Socket/FileHandle.test.cc b/Socket/FileHandle.test.cc index c86a26b..262bf0c 100644 --- a/Socket/FileHandle.test.cc +++ b/Socket/FileHandle.test.cc @@ -1,6 +1,6 @@ // $Id$ // -// Copyright (C) 2006 +// Copyright (C) 2006 // Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS) // Kompetenzzentrum fuer Satelitenkommunikation (SatCom) // Stefan Bund @@ -38,19 +38,19 @@ ///////////////////////////////cc.p//////////////////////////////////////// namespace { - class FHandle : public satcom::lib::FileHandle + class FHandle : public senf::FileHandle { public: - FHandle(int fd=-1) - : satcom::lib::FileHandle(std::auto_ptr( - new satcom::lib::FileBody(fd))) {} - FHandle(std::string name) - : satcom::lib::FileHandle(std::auto_ptr( - new satcom::lib::FileBody())) + FHandle(int fd=-1) + : senf::FileHandle(std::auto_ptr( + new senf::FileBody(fd))) {} + FHandle(std::string name) + : senf::FileHandle(std::auto_ptr( + new senf::FileBody())) { int rv = ::open(name.c_str(),O_RDWR|O_NONBLOCK) ; if (rv<0) - throw satcom::lib::SystemException(errno); + throw senf::SystemException(errno); fd(rv); } }; @@ -68,13 +68,13 @@ BOOST_AUTO_UNIT_TEST(fileHandle) FHandle fh2(fh); BOOST_CHECK_EQUAL(fh.fd(), fh2.fd()); - + BOOST_CHECK(fh.writeable()); BOOST_CHECK_NO_THROW(fh.close()); - BOOST_CHECK_THROW(fh.close(),satcom::lib::SystemException); + BOOST_CHECK_THROW(fh.close(),senf::SystemException); BOOST_CHECK_NO_THROW(fh.terminate()); } - + { FHandle fh("/dev/zero"); BOOST_CHECK(fh.readable()); @@ -104,12 +104,15 @@ BOOST_AUTO_UNIT_TEST(fileHandle) BOOST_FAIL(ex.what()); } } - + ///////////////////////////////cc.e//////////////////////////////////////// #undef prefix_ // Local Variables: // mode: c++ -// c-file-style: "satcom" +// fill-column: 100 +// c-file-style: "senf" +// indent-tabs-mode: nil +// ispell-local-dictionary: "american" // End: