From: g0dil Date: Thu, 3 Apr 2008 13:23:56 +0000 (+0000) Subject: Utils/Daemon: Adjust unit-test 'argv' parameter to make the test compile again X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=c982fa43422749639c03870b4a6fd756b167ffcb;p=senf.git Utils/Daemon: Adjust unit-test 'argv' parameter to make the test compile again Console: Fix names which have been removed in the last commit git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@778 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/Console/testServer.cc b/Console/testServer.cc index b62554d..fe42969 100644 --- a/Console/testServer.cc +++ b/Console/testServer.cc @@ -41,11 +41,12 @@ namespace { void fn(std::ostream & output, senf::console::ParseCommandInfo const & command) { - senf::console::CommandNode::Arguments::iterator i (command.arguments().begin()); - senf::console::CommandNode::Arguments::iterator i_end (command.arguments().end()); + typedef senf::console::ParseCommandInfo::ArgumentsRange::iterator iterator; + iterator i (command.arguments().begin()); + iterator i_end (command.arguments().end()); for (; i != i_end; ++i) { - senf::console::ParseCommandInfo::ArgumentsRange::value_type::iterator j (i->begin()); - senf::console::ParseCommandInfo::ArgumentsRange::value_type::iterator j_end (i->end()); + iterator::value_type::iterator j (i->begin()); + iterator::value_type::iterator j_end (i->end()); for (; j != j_end; ++j) output << j->value() << ' '; } diff --git a/Utils/Daemon/Daemon.test.cc b/Utils/Daemon/Daemon.test.cc index e456939..f6c8bf6 100644 --- a/Utils/Daemon/Daemon.test.cc +++ b/Utils/Daemon/Daemon.test.cc @@ -71,13 +71,13 @@ namespace { } }; - int myMain(int argc, char const ** argv) + int myMain(int argc, char ** argv) { MyDaemon instance; return instance.start(argc, argv); } - int run(int argc, char const ** argv) + int run(int argc, char ** argv) { int pid (::fork()); if (pid < 0) throw senf::SystemException("::fork()"); @@ -93,9 +93,9 @@ namespace { BOOST_AUTO_UNIT_TEST(testDaemon) { - char const * args[] = { "run", - "--console-log=testDaemon.log,none", - "--pid-file=testDaemon.pid" }; + char * args[] = { "run", + "--console-log=testDaemon.log,none", + "--pid-file=testDaemon.pid" }; BOOST_CHECK_EQUAL( run(sizeof(args)/sizeof(*args),args), 0 ); BOOST_CHECK( ! boost::filesystem::exists("invalid.log") );