void host_object::test<7>() { const char* str = "192.168.1.1"; U32 port = 8080, ip; LLHost host; host.set(str,port); ip = ip_string_to_u32(str); ensure("IP address is invalid", (ip == host.getAddress())); ensure("Port Number is invalid", (port == host.getPort())); str = "64.233.187.99"; ip = ip_string_to_u32(str); host.setAddress(str); ensure("IP address is invalid", (ip == host.getAddress())); ip = 0xc098017b; host.setAddress(ip); ensure("IP address is invalid", (ip == host.getAddress())); // should still use the old port ensure("Port Number is invalid", (port == host.getPort())); port = 8084; host.setPort(port); ensure("Port Number is invalid", (port == host.getPort())); // should still use the old address ensure("IP address is invalid", (ip == host.getAddress())); }