mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
amf0 utest: remove the object read/write function, directly use object to read or write.
This commit is contained in:
parent
a3ae871360
commit
8ed9ae6242
4 changed files with 34 additions and 92 deletions
|
@ -729,4 +729,22 @@ VOID TEST(AMF0Test, AnyAssert)
|
|||
SrsAutoFree(SrsAmf0Any, o, false);
|
||||
EXPECT_TRUE(o->is_ecma_array());
|
||||
}
|
||||
|
||||
// empty object
|
||||
if (true) {
|
||||
o = SrsAmf0Any::object();
|
||||
SrsAutoFree(SrsAmf0Any, o, false);
|
||||
s.reset();
|
||||
EXPECT_EQ(ERROR_SUCCESS, o->write(&s));
|
||||
EXPECT_EQ(1+3, s.pos());
|
||||
}
|
||||
|
||||
// empty ecma array
|
||||
if (true) {
|
||||
o = SrsAmf0Any::ecma_array();
|
||||
SrsAutoFree(SrsAmf0Any, o, false);
|
||||
s.reset();
|
||||
EXPECT_EQ(ERROR_SUCCESS, o->write(&s));
|
||||
EXPECT_EQ(1+4+3, s.pos());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue