Unit tests for Matroska

This commit is contained in:
Urs Fleisch
2025-09-04 15:58:02 +02:00
parent 280d6306d2
commit d2bf7e72d2
6 changed files with 984 additions and 6 deletions

BIN
tests/data/no-tags.mka Normal file

Binary file not shown.

BIN
tests/data/no-tags.webm Normal file

Binary file not shown.

BIN
tests/data/optimized.mkv Normal file

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -156,6 +156,9 @@
#include <cppunit/extensions/HelperMacros.h>
#include "matroskaattachedfile.h"
#include "matroskaattachments.h"
using namespace std;
using namespace TagLib;
@ -306,8 +309,11 @@ public:
#ifdef TAGLIB_WITH_MATROSKA
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::Matroska::File));
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::Matroska::Properties));
// TODO move non pimpl fields into private class.
// CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::Matroska::Tag));
CPPUNIT_ASSERT_EQUAL(classSize(3, true), sizeof(TagLib::Matroska::Tag));
CPPUNIT_ASSERT_EQUAL(classSize(0, true), sizeof(TagLib::Matroska::Element));
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::Matroska::Attachments));
CPPUNIT_ASSERT_EQUAL(classSize(0, false), sizeof(TagLib::Matroska::SimpleTag));
CPPUNIT_ASSERT_EQUAL(classSize(0, false), sizeof(TagLib::Matroska::AttachedFile));
#endif
}