1#include <cppunit/extensions/HelperMacros.h>
7static const char sock_file[] =
"/tmp/simple-socket_test.sock";
8static const char send_msg[] =
"The quick brown fox jumps over the lazy dog";
12class UnixDatagramSocket_TEST :
public CppUnit::TestFixture
14 CPPUNIT_TEST_SUITE( UnixDatagramSocket_TEST );
15 CPPUNIT_TEST( testSendTo );
16 CPPUNIT_TEST_SUITE_END();
47 CPPUNIT_ASSERT_EQUAL(
len, ret );
48 CPPUNIT_ASSERT_EQUAL( std::string(
sock_file), source );
51 CPPUNIT_ASSERT_EQUAL( 0, ret );
52 CPPUNIT_ASSERT_EQUAL( std::string(
sock_file), source );
static NET::can_frame recv_msg
static NET::can_frame send_msg
static const char sock_file[]
CPPUNIT_TEST_SUITE_REGISTRATION(UnixDatagramSocket_TEST)
Unix datagram socket class.
void sendTo(const void *buffer, size_t len, std::string_view foreignPath)
int timedReceiveFrom(void *buffer, size_t len, std::string &sourcePath, int timeout)
int receiveFrom(void *buffer, size_t len, std::string &sourcePath)
void bind(std::string_view localPath)