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

fix #126, srs_publiser add warnings. refine config utest.

This commit is contained in:
winlin 2014-07-26 14:43:37 +08:00
parent b17c736f3f
commit 7241fa8744
8 changed files with 84 additions and 8 deletions

View file

@ -4341,3 +4341,26 @@ VOID TEST(ConfigMainTest, ParseFullConf_removed)
EXPECT_STREQ("/", conf.get_vhost_http_mount(vhost).c_str());
EXPECT_STREQ("./objs/nginx/html", conf.get_vhost_http_dir(vhost).c_str());
}
VOID TEST(ConfigMainTest, CheckConf_listen)
{
if (true) {
MockSrsConfig conf;
EXPECT_TRUE(ERROR_SUCCESS != conf.parse("listens 1935;"));
}
if (true) {
MockSrsConfig conf;
EXPECT_TRUE(ERROR_SUCCESS != conf.parse("listen 0;"));
}
if (true) {
MockSrsConfig conf;
EXPECT_TRUE(ERROR_SUCCESS != conf.parse("listen -1;"));
}
if (true) {
MockSrsConfig conf;
EXPECT_TRUE(ERROR_SUCCESS != conf.parse("listen -1935;"));
}
}