Use =default for skeleton copy constructor
[ACE_TAO.git] / ACE / tests / Bug_3744_Regression_Test.cpp
blob66fac13b54a512c3b4085e1e696322844d559e23
1 #include "test_config.h"
2 #include "ace/OS_NS_string.h"
3 #include "ace/OS_NS_netdb.h"
5 #undef THIS_IS_NOT_AN_ASSERT_IT_IS_A_NON_DEBUG_TEST_AS_WELL
6 #define THIS_IS_NOT_AN_ASSERT_IT_IS_A_NON_DEBUG_TEST_AS_WELL(X) \
7 ((X) \
8 ? static_cast<void>(0) \
9 : ACE_VERSIONED_NAMESPACE_NAME::__ace_assert(__FILE__, __LINE__, ACE_TEXT_CHAR_TO_TCHAR (#X)))
11 int
12 getmacaddress_test ()
14 ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Testing getmacaddress\n")));
16 #if defined (ACE_LACKS_NETWORKING)
17 return 0;
18 #else /* ACE_LACKS_NETWORKING */
19 struct ACE_OS::macaddr_node_t node;
21 ACE_OS::memset (&node, 0x0, sizeof (node));
22 int retval = ACE_OS::getmacaddress (&node);
23 if (retval == 0)
25 if (node.node[0] == 0x0 && node.node[1] == 0x0 && node.node[2] == 0x0 &&
26 node.node[3] == 0x0 && node.node[4] == 0x0 && node.node[5] == 0x0)
28 ACE_ERROR ((LM_ERROR,
29 ACE_TEXT ("ACE_OS::getmacaddress() failed to get MAC address\n")));
30 ++retval;
33 else
35 ACE_ERROR ((LM_ERROR,
36 ACE_TEXT ("ACE_OS::getmacaddress() returned %d, should be 0. %p\n"),
37 retval, ACE_TEXT ("error:")));
40 ACE_DEBUG ((LM_DEBUG,
41 ACE_TEXT ("MAC address: %02x:%02x:%02x:%02x:%02x:%02x\n"),
42 node.node[0], node.node[1], node.node[2],
43 node.node[3], node.node[4], node.node[5]));
45 return retval;
46 #endif /* ACE_LACKS_NETWORKING */
49 int
50 run_main (int, ACE_TCHAR *[])
52 ACE_START_TEST (ACE_TEXT ("Bug_3744_Regression_Test"));
54 int status = 0;
55 int result;
57 if ((result = getmacaddress_test ()) != 0)
58 status = result;
60 ACE_END_TEST;
61 return status;
63 #undef THIS_IS_NOT_AN_ASSERT_IT_IS_A_NON_DEBUG_TEST_AS_WELL