2 //=============================================================================
4 * @file Bug_3729_Regression_Test.cpp
6 //=============================================================================
9 #include "test_config.h"
10 #include "ace/OS_NS_string.h"
11 #include "ace/INET_Addr.h"
12 #include "ace/Log_Msg.h"
14 struct Multicast_Address
20 int run_main (int, ACE_TCHAR
*[])
22 ACE_START_TEST (ACE_TEXT ("Bug_3729_Regression_Test"));
24 int status
= 0; // Innocent until proven guilty
26 // Test is_multicast()
27 Multicast_Address mcast_addresses
[] =
29 { "223.0.0.5:23006", false },
30 { "224.0.0.0:23006", true },
31 { "224.0.0.1:23006", true },
32 { "239.255.255.255:23006", true },
33 { "240.0.0.0:23006", false },
34 { "2.0.0.224", false },
38 for (int i
= 0; mcast_addresses
[i
].addr_
; ++i
)
40 ACE_INET_Addr
addr (mcast_addresses
[i
].addr_
);
42 if (addr
.is_multicast () != mcast_addresses
[i
].is_multicast_
)
45 ACE_TEXT ("ACE_INET_Addr::is_multicast() for ")
46 ACE_TEXT ("\"%C\" incorrectly returned %d\n"),
47 mcast_addresses
[i
].addr_
,
48 (int)addr
.is_multicast ()));