mirror of
https://github.com/ossrs/srs.git
synced 2025-02-15 04:42:04 +00:00
Kernel: Add utest for srs_string_split
This commit is contained in:
parent
8580b1e5fb
commit
473942c6f6
1 changed files with 8 additions and 0 deletions
|
@ -2695,6 +2695,14 @@ VOID TEST(KernelUtility, StringSplitUtils)
|
|||
EXPECT_TRUE("s" == srs_string_split("srs", "r").at(0));
|
||||
EXPECT_TRUE("s" == srs_string_split("srs", "rs").at(0));
|
||||
}
|
||||
|
||||
if (true) {
|
||||
vector<string> ss = srs_string_split("/xxx/yyy", "/");
|
||||
EXPECT_EQ(3, ss.size());
|
||||
EXPECT_STREQ("", ss.at(0).c_str());
|
||||
EXPECT_STREQ("xxx", ss.at(1).c_str());
|
||||
EXPECT_STREQ("yyy", ss.at(2).c_str());
|
||||
}
|
||||
}
|
||||
|
||||
VOID TEST(KernelUtility, StringSplitUtils2)
|
||||
|
|
Loading…
Reference in a new issue