MCPcopy Create free account
hub / github.com/apache/brpc / test_parse_and_serialize

Function test_parse_and_serialize

test/endpoint_unittest.cpp:220–225  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

218}
219
220static 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
227TEST(EndPointTest, ipv4) {
228 test_listen_connect("127.0.0.1:8787", "127.0.0.1:");

Callers 1

TESTFunction · 0.85

Calls 3

str2endpointFunction · 0.85
endpoint2strFunction · 0.85
c_strMethod · 0.45

Tested by

no test coverage detected