Toggle navigation
Toggle navigation
此项目
正在载入...
Sign in
胡斌
/
srs
转到一个项目
Toggle navigation
项目
群组
代码片段
帮助
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
winlin
2014-07-20 17:44:20 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
21f49a9875043df47578cb1cf12682f1254c4aa6
21f49a98
1 parent
6e8c4df4
add basic utest for config service
隐藏空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
22 行增加
和
0 行删除
trunk/src/utest/srs_utest_config.cpp
trunk/src/utest/srs_utest_config.cpp
查看文件 @
21f49a9
...
...
@@ -797,3 +797,25 @@ VOID TEST(ConfigMainTest, ParseEmpty)
MockSrsConfig
conf
;
EXPECT_TRUE
(
ERROR_SUCCESS
!=
conf
.
parse
(
""
));
}
VOID
TEST
(
ConfigMainTest
,
ParseMinConf
)
{
MockSrsConfig
conf
;
EXPECT_TRUE
(
ERROR_SUCCESS
==
conf
.
parse
(
"listen 1935;"
));
vector
<
string
>
listens
=
conf
.
get_listen
();
EXPECT_EQ
(
1
,
(
int
)
listens
.
size
());
EXPECT_STREQ
(
"1935"
,
listens
.
at
(
0
).
c_str
());
}
VOID
TEST
(
ConfigMainTest
,
ParseInvalidDirective
)
{
MockSrsConfig
conf
;
EXPECT_TRUE
(
ERROR_SUCCESS
!=
conf
.
parse
(
"listens 1935;"
));
}
VOID
TEST
(
ConfigMainTest
,
ParseInvalidDirective2
)
{
MockSrsConfig
conf
;
EXPECT_TRUE
(
ERROR_SUCCESS
!=
conf
.
parse
(
"chunk_size 4096;"
));
}
...
...
请
注册
或
登录
后发表评论