| 218 | } |
| 219 | |
| 220 | static void test_parse_and_serialize(const std::string& instr, const std::string& outstr) { |
| 221 | butil::EndPoint ep; |
| 222 | ASSERT_EQ(0, butil::str2endpoint(instr.c_str(), &ep)); |
| 223 | butil::EndPointStr s = butil::endpoint2str(ep); |
| 224 | ASSERT_EQ(outstr, std::string(s.c_str())); |
| 225 | } |
| 226 | |
| 227 | TEST(EndPointTest, ipv4) { |
| 228 | test_listen_connect("127.0.0.1:8787", "127.0.0.1:"); |
no test coverage detected