1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

Improve test coverage for service TCP/UDP.

This commit is contained in:
winlin 2020-01-05 18:42:37 +08:00
parent 265b70863c
commit 02c1bd0946
2 changed files with 8 additions and 5 deletions

View file

@ -914,5 +914,13 @@ VOID TEST(TCPServerTest, TCPClientServer)
HELPER_ASSERT_SUCCESS(c.read_fully(buf, 5, NULL));
EXPECT_STREQ("Hello", buf);
}
if (true) {
HELPER_ASSERT_SUCCESS(c.write((void*)"Hello", 5, NULL));
char buf[6]; HELPER_ARRAY_INIT(buf, 6, 0);
HELPER_ASSERT_SUCCESS(srs_read(c.stfd, buf, 5, NULL));
EXPECT_STREQ("Hello", buf);
}
}