parser_tests: Add another truncated chapter string test.
Causes mkvparser to fail in a slightly different way. Change-Id: Id60fd43e6d0ef1871842367d19db52f60a8721cc
This commit is contained in:
parent
1de8d4cb4f
commit
125049eecd
@ -703,6 +703,17 @@ TEST_F(ParserTest, InvalidTruncatedChapterString) {
|
|||||||
EXPECT_EQ(mkvparser::E_PARSE_FAILED, segment_->Load());
|
EXPECT_EQ(mkvparser::E_PARSE_FAILED, segment_->Load());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST_F(ParserTest, InvalidTruncatedChapterString2) {
|
||||||
|
filename_ =
|
||||||
|
GetTestFilePath("invalid/chapters_truncated_chapter_string_2.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_FILE_FORMAT_INVALID, 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());
|
||||||
|
19
testing/testdata/invalid/README.libwebm
vendored
19
testing/testdata/invalid/README.libwebm
vendored
@ -1,11 +1,14 @@
|
|||||||
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
|
chapters_truncated_chapter_string.mkv -
|
||||||
with a ChapterAtom whose ChapterDisplay
|
File with a Chapters element that ends with a ChapterAtom whose ChapterDisplay
|
||||||
element contains a truncated
|
element contains a truncated ChapterString.
|
||||||
ChapterString.
|
|
||||||
|
|
||||||
fixed_lacing_bad_lace_size.mkv - File containing a BlockGroup with fixed
|
chapters_truncated_chapter_string_2.mkv -
|
||||||
lacing, but reports a total laced size that is
|
Nearly identical to chapters_truncated_chapter_string.mkv, but with a void
|
||||||
not evenly divisible by the number of laced
|
element and a partial cluster. Causes mkvparser to fail in a slightly
|
||||||
frames.
|
different manner.
|
||||||
|
|
||||||
|
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 frames.
|
||||||
|
BIN
testing/testdata/invalid/chapters_truncated_chapter_string_2.mkv
vendored
Normal file
BIN
testing/testdata/invalid/chapters_truncated_chapter_string_2.mkv
vendored
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user