parser_tests: Add truncated chapter string test.
Change-Id: I1714fbfea5bab61cca61cd32a0a0d30315ed56fc
This commit is contained in:
@@ -693,6 +693,16 @@ TEST_F(ParserTest, Vp9CodecPrivateBadTest) {
|
|||||||
kCodecPrivateLength, NULL));
|
kCodecPrivateLength, NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST_F(ParserTest, InvalidTruncatedChapterString) {
|
||||||
|
filename_ = GetTestFilePath("invalid/chapters_truncated_chapter_string.mkv");
|
||||||
|
ASSERT_NE(0u, filename_.length());
|
||||||
|
ASSERT_EQ(0, reader_.Open(filename_.c_str()));
|
||||||
|
mkvparser::EBMLHeader ebml_header;
|
||||||
|
ASSERT_EQ(0, ebml_header.Parse(&reader_, pos_));
|
||||||
|
ASSERT_EQ(0, mkvparser::Segment::CreateInstance(&reader_, pos_, segment_));
|
||||||
|
EXPECT_EQ(mkvparser::E_PARSE_FAILED, segment_->Load());
|
||||||
|
}
|
||||||
|
|
||||||
TEST_F(ParserTest, InvalidFixedLacingSize) {
|
TEST_F(ParserTest, InvalidFixedLacingSize) {
|
||||||
filename_ = GetTestFilePath("invalid/fixed_lacing_bad_lace_size.mkv");
|
filename_ = GetTestFilePath("invalid/fixed_lacing_bad_lace_size.mkv");
|
||||||
ASSERT_NE(0u, filename_.length());
|
ASSERT_NE(0u, filename_.length());
|
||||||
|
|||||||
5
testing/testdata/invalid/README.libwebm
vendored
5
testing/testdata/invalid/README.libwebm
vendored
@@ -1,5 +1,10 @@
|
|||||||
Why the files in this directory are considered invalid:
|
Why the files in this directory are considered invalid:
|
||||||
|
|
||||||
|
chapters_truncated_chapter_string.mkv - File with a Chapters element that ends
|
||||||
|
with a ChapterAtom whose ChapterDisplay
|
||||||
|
element contains a truncated
|
||||||
|
ChapterString.
|
||||||
|
|
||||||
fixed_lacing_bad_lace_size.mkv - File containing a BlockGroup with fixed
|
fixed_lacing_bad_lace_size.mkv - File containing a BlockGroup with fixed
|
||||||
lacing, but reports a total laced size that is
|
lacing, but reports a total laced size that is
|
||||||
not evenly divisible by the number of laced
|
not evenly divisible by the number of laced
|
||||||
|
|||||||
BIN
testing/testdata/invalid/chapters_truncated_chapter_string.mkv
vendored
Normal file
BIN
testing/testdata/invalid/chapters_truncated_chapter_string.mkv
vendored
Normal file
Binary file not shown.
Reference in New Issue
Block a user