mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
fix bug for utest of message array, it does not free messages now.
This commit is contained in:
parent
23f4aa5737
commit
abb0fce3d8
1 changed files with 4 additions and 4 deletions
|
@ -541,18 +541,18 @@ VOID TEST(ProtocolMsgArrayTest, MessageArray)
|
||||||
arr.msgs[2] = msg.copy();
|
arr.msgs[2] = msg.copy();
|
||||||
EXPECT_EQ(3, msg.count());
|
EXPECT_EQ(3, msg.count());
|
||||||
}
|
}
|
||||||
EXPECT_EQ(0, msg.count());
|
EXPECT_EQ(3, msg.count());
|
||||||
|
|
||||||
if (true) {
|
if (true) {
|
||||||
SrsMessageArray arr(3);
|
SrsMessageArray arr(3);
|
||||||
|
|
||||||
arr.msgs[0] = msg.copy();
|
arr.msgs[0] = msg.copy();
|
||||||
EXPECT_EQ(1, msg.count());
|
EXPECT_EQ(4, msg.count());
|
||||||
|
|
||||||
arr.msgs[2] = msg.copy();
|
arr.msgs[2] = msg.copy();
|
||||||
EXPECT_EQ(2, msg.count());
|
EXPECT_EQ(5, msg.count());
|
||||||
}
|
}
|
||||||
EXPECT_EQ(0, msg.count());
|
EXPECT_EQ(5, msg.count());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue