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

Function TEST_F

test/brpc_http_rpc_protocol_unittest.cpp:303–314  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

301};
302
303TEST_F(HttpTest, indenting_ostream) {
304 std::ostringstream os1;
305 brpc::IndentingOStream is1(os1, 2);
306 brpc::IndentingOStream is2(is1, 2);
307 os1 << "begin1\nhello" << std::endl << "world\nend1" << std::endl;
308 is1 << "begin2\nhello" << std::endl << "world\nend2" << std::endl;
309 is2 << "begin3\nhello" << std::endl << "world\nend3" << std::endl;
310 ASSERT_EQ(
311 "begin1\nhello\nworld\nend1\nbegin2\n hello\n world\n end2\n"
312 " begin3\n hello\n world\n end3\n",
313 os1.str());
314}
315
316TEST_F(HttpTest, parse_http_address) {
317 const std::string EXP_HOSTNAME = "www.baidu.com:9876";

Callers

nothing calls this directly

Calls 15

ParseHttpServerAddressFunction · 0.85
endpoint2strFunction · 0.85
ip2strFunction · 0.85
SerializeHttpRequestFunction · 0.85
PackHttpRequestFunction · 0.85
ParseHttpMessageFunction · 0.85
string_printfFunction · 0.85
EndPointClass · 0.85
my_ipFunction · 0.85
CopyPAPrefixedWithSeqNoFunction · 0.85
SerializeFrameHeadFunction · 0.85
ParseH2MessageFunction · 0.85

Tested by

no test coverage detected