Commit 9f6eb52b authored by Pekka Pessi's avatar Pekka Pessi
Browse files

Added tests for tport_convert_addr.

darcs-hash:20050908183639-65a35-cc77c3aecda936404b146182bcc00ccfb8d07458.gz
parent 8039b7c1
......@@ -122,8 +122,30 @@ void usage(void)
static int name_test(tp_test_t *tt)
{
tp_name_t tpn[1];
su_home_t home[1] = { SU_HOME_INIT(home) };
su_sockaddr_t su[1];
BEGIN();
memset(su, 0, sizeof su);
su->su_port = htons(5060);
su->su_family = AF_INET;
TEST(tport_convert_addr(home, tpn, "tcp", "localhost", su), 0);
su->su_family = AF_INET;
TEST(tport_convert_addr(home, tpn, "tcp", "localhost", su), 0);
su->su_family = AF_INET6;
#if SU_HAVE_IN6
TEST(tport_convert_addr(home, tpn, "tcp", "localhost", su), 0);
#endif
END();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment