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

Log: Use string compare function

This commit is contained in:
winlin 2020-07-05 23:49:47 +08:00
parent 6624b8acca
commit f551ff5ae8
6 changed files with 22 additions and 12 deletions

View file

@ -1383,8 +1383,8 @@ VOID TEST(TCPServerTest, ContextUtility)
SrsThreadContext ctx;
EXPECT_TRUE(ctx.set_id(SrsContextId("100")).empty());
EXPECT_TRUE(ctx.set_id(SrsContextId("1000")).equals(SrsContextId("100")));
EXPECT_TRUE(ctx.get_id().equals(SrsContextId("1000")));
EXPECT_TRUE(!ctx.set_id(SrsContextId("1000")).compare(SrsContextId("100")));
EXPECT_TRUE(!ctx.get_id().compare(SrsContextId("1000")));
ctx.clear_cid();
EXPECT_TRUE(ctx.set_id(SrsContextId("100")).empty());