| 301 | }; |
| 302 | |
| 303 | TEST_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 | |
| 316 | TEST_F(HttpTest, parse_http_address) { |
| 317 | const std::string EXP_HOSTNAME = "www.baidu.com:9876"; |
nothing calls this directly
no test coverage detected