Skip to content
Snippets Groups Projects
Commit e44b5b0a authored by jmo's avatar jmo
Browse files

doing a unit test in a more sensible way :)

parent 21615443
No related branches found
No related tags found
No related merge requests found
......@@ -35,26 +35,23 @@
BOOST_AUTO_UNIT_TEST(unDatagramSocketHandle)
{
std::string hallo = "Hallo Welt.";
std::string testS = "/tmp/senfTestSocket";
if( unlink(testS.c_str()) != 0)
perror( "unlink failed");
std::string hallo = "Hallo Welt.";
std::string testS = ".socket-UNDatagramSocketHandle.test";
unlink(testS.c_str());
senf::UNSocketAddress addr (testS) ;
senf::UNDatagramClientSocketHandle inputSocket(addr);
senf::UNDatagramClientSocketHandle outputSocket;
outputSocket.writeto( addr, hallo);
BOOST_CHECK_EQUAL( inputSocket.read(), hallo);
outputSocket.close();
inputSocket.close();
printf( "dasklfhsdlkfjsdkl\n");
printf( "%s\n", testS.c_str());
if( unlink(testS.c_str()) != 0)
perror( "unlink failed");
senf::UNSocketAddress addr (testS) ;
senf::UNDatagramClientSocketHandle inputSocket(addr);
senf::UNDatagramClientSocketHandle outputSocket;
outputSocket.writeto( addr, hallo);
BOOST_CHECK_EQUAL( inputSocket.read(), hallo);
outputSocket.close();
inputSocket.close();
if( unlink(testS.c_str()) != 0)
perror( "unlink failed");
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment