On 5/15/20 9:54 AM, Alex Henrie wrote:
ok( WSAGetLastError() == ipv6_tests[j].error,
"WSAStringToAddress(%s) gave error %d, expected %d\n",
wine_dbgstr_a( ipv6_tests[j].input ), WSAGetLastError(), ipv6_tests[j].error );
ok( WSAGetLastError() == ipv6_tests[j].error,
"WSAStringToAddress(%s) gave error %d, expected %d\n",
wine_dbgstr_a( ipv6_tests[j].input ), WSAGetLastError(), ipv6_tests[j].error );
I think you accidentally duplicated this line.
+todo_wine_if(ipv6_tests[j].error)
ok( sockaddr6.sin6_family == expected_family,
"WSAStringToAddress(%s) gave family %d, expected %d\n",
wine_dbgstr_a( ipv4_tests[j].input ), sockaddr6.sin6_family );
+todo_wine_if(ipv6_tests[j].error)
ok( sockaddr6.sin6_addr.s6_words[0] == ipv6_tests[j].address[0] &&
sockaddr6.sin6_addr.s6_words[1] == ipv6_tests[j].address[1] &&
sockaddr6.sin6_addr.s6_words[2] == ipv6_tests[j].address[2] &&
sockaddr6.sin6_addr.s6_words[3] == ipv6_tests[j].address[3] &&
sockaddr6.sin6_addr.s6_words[4] == ipv6_tests[j].address[4] &&
sockaddr6.sin6_addr.s6_words[5] == ipv6_tests[j].address[5] &&
sockaddr6.sin6_addr.s6_words[6] == ipv6_tests[j].address[6] &&
sockaddr6.sin6_addr.s6_words[7] == ipv6_tests[j].address[7],
Could this just be memcmp()? (Could the whole structure be compared that way?)
"WSAStringToAddress(%s) gave address %x:%x:%x:%x:%x:%x:%x:%x, expected %x:%x:%x:%x:%x:%x:%x:%x\n",
wine_dbgstr_a( ipv6_tests[j].input ),
sockaddr6.sin6_addr.s6_words[0], sockaddr6.sin6_addr.s6_words[1],
sockaddr6.sin6_addr.s6_words[2], sockaddr6.sin6_addr.s6_words[3],
sockaddr6.sin6_addr.s6_words[4], sockaddr6.sin6_addr.s6_words[5],
sockaddr6.sin6_addr.s6_words[6], sockaddr6.sin6_addr.s6_words[7],
ipv6_tests[j].address[0], ipv6_tests[j].address[1],
ipv6_tests[j].address[2], ipv6_tests[j].address[3],
ipv6_tests[j].address[4], ipv6_tests[j].address[5],
ipv6_tests[j].address[6], ipv6_tests[j].address[7] );
ok( sockaddr6.sin6_scope_id == 0,
"WSAStringToAddress(%s) gave scope %d, expected 0\n",
wine_dbgstr_a( ipv4_tests[j].input ), sockaddr6.sin6_scope_id );
ok( sockaddr6.sin6_port == ipv6_tests[j].port,
"WSAStringToAddress(%s) gave port %04x, expected %04x\n",
wine_dbgstr_a( ipv6_tests[j].input ), sockaddr6.sin6_port, ipv6_tests[j].port );
}
} }
static DWORD WINAPI SelectReadThread(void *param)