mirror of
https://github.com/taglib/taglib.git
synced 2026-03-30 02:34:57 -04:00
C bindings, fileref, fix warnings
This commit is contained in:
@ -65,6 +65,11 @@ IF(WITH_SHORTEN)
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../taglib/shorten
|
||||
)
|
||||
ENDIF()
|
||||
IF(WITH_MATROSKA)
|
||||
SET(test_HDR_DIRS ${test_HDR_DIRS}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../taglib/matroska
|
||||
)
|
||||
ENDIF()
|
||||
INCLUDE_DIRECTORIES(${test_HDR_DIRS})
|
||||
|
||||
SET(test_runner_SRCS
|
||||
@ -152,6 +157,11 @@ IF(WITH_SHORTEN)
|
||||
test_shorten.cpp
|
||||
)
|
||||
ENDIF()
|
||||
IF(WITH_MATROSKA)
|
||||
SET(test_runner_SRCS ${test_runner_SRCS}
|
||||
test_matroska.cpp
|
||||
)
|
||||
ENDIF()
|
||||
IF(BUILD_BINDINGS)
|
||||
SET(test_runner_SRCS ${test_runner_SRCS}
|
||||
test_tag_c.cpp
|
||||
|
||||
@ -472,6 +472,11 @@ public:
|
||||
#endif
|
||||
#ifdef TAGLIB_WITH_SHORTEN
|
||||
CPPUNIT_ASSERT(extensions.contains("shn"));
|
||||
#endif
|
||||
#ifdef TAGLIB_WITH_MATROSKA
|
||||
CPPUNIT_ASSERT(extensions.contains("mkv"));
|
||||
CPPUNIT_ASSERT(extensions.contains("mka"));
|
||||
CPPUNIT_ASSERT(extensions.contains("webm"));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
28
tests/test_matroska.cpp
Normal file
28
tests/test_matroska.cpp
Normal file
@ -0,0 +1,28 @@
|
||||
#include <string>
|
||||
#include <cstdio>
|
||||
|
||||
#include "tbytevectorlist.h"
|
||||
#include "tpropertymap.h"
|
||||
#include "tag.h"
|
||||
#include "matroskafile.h"
|
||||
#include "plainfile.h"
|
||||
#include <cppunit/extensions/HelperMacros.h>
|
||||
#include "utils.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace TagLib;
|
||||
|
||||
class TestMatroska : public CppUnit::TestFixture
|
||||
{
|
||||
CPPUNIT_TEST_SUITE(TestMatroska);
|
||||
CPPUNIT_TEST(testTags);
|
||||
CPPUNIT_TEST_SUITE_END();
|
||||
|
||||
public:
|
||||
void testTags()
|
||||
{
|
||||
// TODO implement
|
||||
}
|
||||
};
|
||||
|
||||
CPPUNIT_TEST_SUITE_REGISTRATION(TestMatroska);
|
||||
@ -148,6 +148,11 @@
|
||||
#include "trueaudiofile.h"
|
||||
#include "trueaudioproperties.h"
|
||||
#endif
|
||||
#ifdef TAGLIB_WITH_MATROSKA
|
||||
#include "matroskafile.h"
|
||||
#include "matroskaproperties.h"
|
||||
#include "matroskatag.h"
|
||||
#endif
|
||||
|
||||
#include <cppunit/extensions/HelperMacros.h>
|
||||
|
||||
@ -297,6 +302,12 @@ public:
|
||||
#ifdef TAGLIB_WITH_TRUEAUDIO
|
||||
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::TrueAudio::File));
|
||||
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::TrueAudio::Properties));
|
||||
#endif
|
||||
#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));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user