parser_tests: Add truncated chapter string test.

Change-Id: I1714fbfea5bab61cca61cd32a0a0d30315ed56fc
This commit is contained in:
Tom Finegan
2016-08-19 12:13:14 -07:00
parent ff8c2b6af7
commit 1de8d4cb4f
3 changed files with 15 additions and 0 deletions

View File

@@ -693,6 +693,16 @@ TEST_F(ParserTest, Vp9CodecPrivateBadTest) {
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) {
filename_ = GetTestFilePath("invalid/fixed_lacing_bad_lace_size.mkv");
ASSERT_NE(0u, filename_.length());

View File

@@ -1,5 +1,10 @@
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
lacing, but reports a total laced size that is
not evenly divisible by the number of laced

Binary file not shown.