Rearrange conditional blocks for supported formats (#1262)

Now the created binary is not longer the same, but the code gets
more readable.
This commit is contained in:
Urs Fleisch 2025-01-31 09:36:29 +01:00
parent 9940cba549
commit 97e72e179c
10 changed files with 268 additions and 454 deletions

View File

@ -1,26 +1,30 @@
set(tag_c_HDR_DIRS
${CMAKE_CURRENT_SOURCE_DIR}/../../taglib
${CMAKE_CURRENT_SOURCE_DIR}/../../taglib/toolkit
${CMAKE_CURRENT_SOURCE_DIR}/../../taglib/mpeg
${CMAKE_CURRENT_SOURCE_DIR}/../../taglib/mpeg/id3v2
${CMAKE_CURRENT_SOURCE_DIR}/../../taglib/mpeg/id3v2/frames
)
if(WITH_ASF)
set(tag_c_HDR_DIRS ${tag_c_HDR_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}/../../taglib/asf
)
endif()
set(tag_c_HDR_DIRS ${tag_c_HDR_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}/../../taglib/mpeg
)
if(WITH_VORBIS)
set(tag_c_HDR_DIRS ${tag_c_HDR_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}/../../taglib/ogg
${CMAKE_CURRENT_SOURCE_DIR}/../../taglib/ogg/vorbis
${CMAKE_CURRENT_SOURCE_DIR}/../../taglib/ogg/flac
${CMAKE_CURRENT_SOURCE_DIR}/../../taglib/flac
${CMAKE_CURRENT_SOURCE_DIR}/../../taglib/ogg/speex
${CMAKE_CURRENT_SOURCE_DIR}/../../taglib/ogg/opus
)
endif()
if(WITH_APE)
set(tag_c_HDR_DIRS ${tag_c_HDR_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}/../../taglib/mpc
${CMAKE_CURRENT_SOURCE_DIR}/../../taglib/wavpack
${CMAKE_CURRENT_SOURCE_DIR}/../../taglib/ape
)
endif()
if(WITH_MP4)
@ -28,20 +32,6 @@ if(WITH_MP4)
${CMAKE_CURRENT_SOURCE_DIR}/../../taglib/mp4
)
endif()
set(tag_c_HDR_DIRS ${tag_c_HDR_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}/../../taglib/mpeg/id3v2
${CMAKE_CURRENT_SOURCE_DIR}/../../taglib/mpeg/id3v2/frames
)
if(WITH_APE)
set(tag_c_HDR_DIRS ${tag_c_HDR_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}/../../taglib/wavpack
)
endif()
if(WITH_VORBIS)
set(tag_c_HDR_DIRS ${tag_c_HDR_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}/../../taglib/ogg/speex
)
endif()
if(WITH_TRUEAUDIO)
set(tag_c_HDR_DIRS ${tag_c_HDR_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}/../../taglib/trueaudio
@ -54,11 +44,6 @@ if(WITH_RIFF)
${CMAKE_CURRENT_SOURCE_DIR}/../../taglib/riff/wav
)
endif()
if(WITH_APE)
set(tag_c_HDR_DIRS ${tag_c_HDR_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}/../../taglib/ape
)
endif()
if(WITH_MOD)
set(tag_c_HDR_DIRS ${tag_c_HDR_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}/../../taglib/it
@ -67,11 +52,6 @@ if(WITH_MOD)
${CMAKE_CURRENT_SOURCE_DIR}/../../taglib/xm
)
endif()
if(WITH_VORBIS)
set(tag_c_HDR_DIRS ${tag_c_HDR_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}/../../taglib/ogg/opus
)
endif()
if(WITH_DSF)
set(tag_c_HDR_DIRS ${tag_c_HDR_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}/../../taglib/dsf

View File

@ -35,24 +35,23 @@
#include "tfile.h"
#include "tpropertymap.h"
#include "fileref.h"
#include "mpegfile.h"
#include "tag.h"
#include "id3v2framefactory.h"
#ifdef WITH_ASF
#include "asffile.h"
#endif
#ifdef WITH_VORBIS
#include "vorbisfile.h"
#endif
#include "mpegfile.h"
#ifdef WITH_VORBIS
#include "flacfile.h"
#include "oggflacfile.h"
#include "speexfile.h"
#include "opusfile.h"
#endif
#ifdef WITH_APE
#include "mpcfile.h"
#include "wavpackfile.h"
#endif
#ifdef WITH_VORBIS
#include "speexfile.h"
#endif
#ifdef WITH_TRUEAUDIO
#include "trueaudiofile.h"
#endif
@ -72,9 +71,6 @@
#include "s3mfile.h"
#include "xmfile.h"
#endif
#ifdef WITH_VORBIS
#include "opusfile.h"
#endif
#ifdef WITH_DSF
#include "dsffile.h"
#include "dsdifffile.h"
@ -82,8 +78,6 @@
#ifdef WITH_SHORTEN
#include "shortenfile.h"
#endif
#include "tag.h"
#include "id3v2framefactory.h"
using namespace TagLib;
@ -167,25 +161,25 @@ TagLib_File *taglib_file_new_type(const char *filename, TagLib_File_Type type)
case TagLib_File_FLAC:
file = new FLAC::File(filename);
break;
case TagLib_File_OggFlac:
file = new Ogg::FLAC::File(filename);
break;
case TagLib_File_Speex:
file = new Ogg::Speex::File(filename);
break;
case TagLib_File_Opus:
file = new Ogg::Opus::File(filename);
break;
#endif
#ifdef WITH_APE
case TagLib_File_MPC:
file = new MPC::File(filename);
break;
#endif
#ifdef WITH_VORBIS
case TagLib_File_OggFlac:
file = new Ogg::FLAC::File(filename);
break;
#endif
#ifdef WITH_APE
case TagLib_File_WavPack:
file = new WavPack::File(filename);
break;
#endif
#ifdef WITH_VORBIS
case TagLib_File_Speex:
file = new Ogg::Speex::File(filename);
case TagLib_File_APE:
file = new APE::File(filename);
break;
#endif
#ifdef WITH_TRUEAUDIO
@ -211,11 +205,6 @@ TagLib_File *taglib_file_new_type(const char *filename, TagLib_File_Type type)
file = new RIFF::WAV::File(filename);
break;
#endif
#ifdef WITH_APE
case TagLib_File_APE:
file = new APE::File(filename);
break;
#endif
#ifdef WITH_MOD
case TagLib_File_IT:
file = new IT::File(filename);
@ -230,11 +219,6 @@ TagLib_File *taglib_file_new_type(const char *filename, TagLib_File_Type type)
file = new XM::File(filename);
break;
#endif
#ifdef WITH_VORBIS
case TagLib_File_Opus:
file = new Ogg::Opus::File(filename);
break;
#endif
#ifdef WITH_DSF
case TagLib_File_DSF:
file = new DSF::File(filename);

View File

@ -1,50 +1,38 @@
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(tag_HDR_DIRS
${CMAKE_CURRENT_SOURCE_DIR}/toolkit
${CMAKE_CURRENT_SOURCE_DIR}/mpeg
${CMAKE_CURRENT_SOURCE_DIR}/mpeg/id3v2
${CMAKE_CURRENT_SOURCE_DIR}/mpeg/id3v2/frames
${CMAKE_CURRENT_SOURCE_DIR}/mpeg/id3v1
)
if(WITH_ASF)
set(tag_HDR_DIRS ${tag_HDR_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}/asf
)
endif()
set(tag_HDR_DIRS ${tag_HDR_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}/mpeg
)
if(WITH_VORBIS)
set(tag_HDR_DIRS ${tag_HDR_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}/ogg
${CMAKE_CURRENT_SOURCE_DIR}/ogg/flac
${CMAKE_CURRENT_SOURCE_DIR}/flac
)
endif()
if(WITH_APE)
set(tag_HDR_DIRS ${tag_HDR_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}/mpc
)
endif()
if(WITH_MP4)
set(tag_HDR_DIRS ${tag_HDR_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}/mp4
)
endif()
if(WITH_VORBIS)
set(tag_HDR_DIRS ${tag_HDR_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}/ogg/vorbis
${CMAKE_CURRENT_SOURCE_DIR}/ogg/speex
${CMAKE_CURRENT_SOURCE_DIR}/ogg/opus
)
endif()
set(tag_HDR_DIRS ${tag_HDR_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}/mpeg/id3v2
${CMAKE_CURRENT_SOURCE_DIR}/mpeg/id3v2/frames
${CMAKE_CURRENT_SOURCE_DIR}/mpeg/id3v1
)
if(WITH_APE)
set(tag_HDR_DIRS ${tag_HDR_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}/mpc
${CMAKE_CURRENT_SOURCE_DIR}/ape
${CMAKE_CURRENT_SOURCE_DIR}/wavpack
)
endif()
if(WITH_MP4)
set(tag_HDR_DIRS ${tag_HDR_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}/mp4
)
endif()
if(WITH_TRUEAUDIO)
set(tag_HDR_DIRS ${tag_HDR_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}/trueaudio
@ -105,8 +93,6 @@ set(tag_HDRS
mpeg/mpegproperties.h
mpeg/mpegheader.h
mpeg/xingheader.h
)
set(tag_HDRS ${tag_HDRS}
mpeg/id3v1/id3v1tag.h
mpeg/id3v1/id3v1genres.h
mpeg/id3v2/id3v2.h
@ -300,6 +286,16 @@ if(WITH_VORBIS)
set(oggflacs_SRCS
ogg/flac/oggflacfile.cpp
)
set(speex_SRCS
ogg/speex/speexfile.cpp
ogg/speex/speexproperties.cpp
)
set(opus_SRCS
ogg/opus/opusfile.cpp
ogg/opus/opusproperties.cpp
)
endif()
if(WITH_APE)
@ -307,21 +303,7 @@ if(WITH_APE)
mpc/mpcfile.cpp
mpc/mpcproperties.cpp
)
endif()
if(WITH_MP4)
set(mp4_SRCS
mp4/mp4file.cpp
mp4/mp4atom.cpp
mp4/mp4tag.cpp
mp4/mp4item.cpp
mp4/mp4properties.cpp
mp4/mp4coverart.cpp
mp4/mp4itemfactory.cpp
)
endif()
if(WITH_APE)
set(ape_SRCS
ape/apetag.cpp
ape/apefooter.cpp
@ -336,15 +318,15 @@ if(WITH_APE)
)
endif()
if(WITH_VORBIS)
set(speex_SRCS
ogg/speex/speexfile.cpp
ogg/speex/speexproperties.cpp
)
set(opus_SRCS
ogg/opus/opusfile.cpp
ogg/opus/opusproperties.cpp
if(WITH_MP4)
set(mp4_SRCS
mp4/mp4file.cpp
mp4/mp4atom.cpp
mp4/mp4tag.cpp
mp4/mp4item.cpp
mp4/mp4properties.cpp
mp4/mp4coverart.cpp
mp4/mp4itemfactory.cpp
)
endif()

View File

@ -41,54 +41,38 @@
#include "tstringlist.h"
#include "tvariant.h"
#include "tdebug.h"
#include "mpegfile.h"
#ifdef WITH_RIFF
#include "aifffile.h"
#include "wavfile.h"
#endif
#ifdef WITH_APE
#include "apefile.h"
#include "mpcfile.h"
#include "wavpackfile.h"
#endif
#ifdef WITH_ASF
#include "asffile.h"
#endif
#ifdef WITH_VORBIS
#include "flacfile.h"
#endif
#ifdef WITH_MOD
#include "itfile.h"
#include "modfile.h"
#endif
#ifdef WITH_MP4
#include "mp4file.h"
#endif
#ifdef WITH_APE
#include "mpcfile.h"
#endif
#include "mpegfile.h"
#ifdef WITH_VORBIS
#include "speexfile.h"
#include "vorbisfile.h"
#include "oggflacfile.h"
#include "opusfile.h"
#endif
#ifdef WITH_MOD
#include "itfile.h"
#include "modfile.h"
#include "xmfile.h"
#include "s3mfile.h"
#endif
#ifdef WITH_VORBIS
#include "speexfile.h"
#ifdef WITH_MP4
#include "mp4file.h"
#endif
#ifdef WITH_TRUEAUDIO
#include "trueaudiofile.h"
#endif
#ifdef WITH_VORBIS
#include "vorbisfile.h"
#endif
#ifdef WITH_RIFF
#include "wavfile.h"
#endif
#ifdef WITH_APE
#include "wavpackfile.h"
#endif
#ifdef WITH_MOD
#include "xmfile.h"
#endif
#ifdef WITH_DSF
#include "dsffile.h"
#include "dsdifffile.h"
@ -187,18 +171,18 @@ namespace
}
else if(ext == "FLAC")
file = new FLAC::File(stream, readAudioProperties, audioPropertiesStyle);
else if(ext == "SPX")
file = new Ogg::Speex::File(stream, readAudioProperties, audioPropertiesStyle);
else if(ext == "OPUS")
file = new Ogg::Opus::File(stream, readAudioProperties, audioPropertiesStyle);
#endif
#ifdef WITH_APE
else if(ext == "MPC")
file = new MPC::File(stream, readAudioProperties, audioPropertiesStyle);
else if(ext == "WV")
file = new WavPack::File(stream, readAudioProperties, audioPropertiesStyle);
#endif
#ifdef WITH_VORBIS
else if(ext == "SPX")
file = new Ogg::Speex::File(stream, readAudioProperties, audioPropertiesStyle);
else if(ext == "OPUS")
file = new Ogg::Opus::File(stream, readAudioProperties, audioPropertiesStyle);
else if(ext == "APE")
file = new APE::File(stream, readAudioProperties, audioPropertiesStyle);
#endif
#ifdef WITH_TRUEAUDIO
else if(ext == "TTA")
@ -218,10 +202,6 @@ namespace
else if(ext == "WAV")
file = new RIFF::WAV::File(stream, readAudioProperties, audioPropertiesStyle);
#endif
#ifdef WITH_APE
else if(ext == "APE")
file = new APE::File(stream, readAudioProperties, audioPropertiesStyle);
#endif
#ifdef WITH_MOD
// module, nst and wow are possible but uncommon extensions
else if(ext == "MOD" || ext == "MODULE" || ext == "NST" || ext == "WOW")
@ -271,18 +251,18 @@ namespace
file = new Ogg::FLAC::File(stream, readAudioProperties, audioPropertiesStyle);
else if(FLAC::File::isSupported(stream))
file = new FLAC::File(stream, readAudioProperties, audioPropertiesStyle);
else if(Ogg::Speex::File::isSupported(stream))
file = new Ogg::Speex::File(stream, readAudioProperties, audioPropertiesStyle);
else if(Ogg::Opus::File::isSupported(stream))
file = new Ogg::Opus::File(stream, readAudioProperties, audioPropertiesStyle);
#endif
#ifdef WITH_APE
else if(MPC::File::isSupported(stream))
file = new MPC::File(stream, readAudioProperties, audioPropertiesStyle);
else if(WavPack::File::isSupported(stream))
file = new WavPack::File(stream, readAudioProperties, audioPropertiesStyle);
#endif
#ifdef WITH_VORBIS
else if(Ogg::Speex::File::isSupported(stream))
file = new Ogg::Speex::File(stream, readAudioProperties, audioPropertiesStyle);
else if(Ogg::Opus::File::isSupported(stream))
file = new Ogg::Opus::File(stream, readAudioProperties, audioPropertiesStyle);
else if(APE::File::isSupported(stream))
file = new APE::File(stream, readAudioProperties, audioPropertiesStyle);
#endif
#ifdef WITH_TRUEAUDIO
else if(TrueAudio::File::isSupported(stream))
@ -302,10 +282,6 @@ namespace
else if(RIFF::WAV::File::isSupported(stream))
file = new RIFF::WAV::File(stream, readAudioProperties, audioPropertiesStyle);
#endif
#ifdef WITH_APE
else if(APE::File::isSupported(stream))
file = new APE::File(stream, readAudioProperties, audioPropertiesStyle);
#endif
#ifdef WITH_DSF
else if(DSF::File::isSupported(stream))
file = new DSF::File(stream, readAudioProperties, audioPropertiesStyle);
@ -485,25 +461,24 @@ StringList FileRef::defaultFileExtensions()
{
StringList l;
l.append("mp3");
l.append("mp2");
l.append("aac");
#ifdef WITH_VORBIS
l.append("ogg");
l.append("flac");
l.append("oga");
l.append("opus");
l.append("spx");
#endif
l.append("mp3");
l.append("mp2");
#ifdef WITH_APE
l.append("mpc");
l.append("wv");
#endif
#ifdef WITH_VORBIS
l.append("spx");
l.append("ape");
#endif
#ifdef WITH_TRUEAUDIO
l.append("tta");
#endif
l.append("aac");
#ifdef WITH_MP4
l.append("m4a");
l.append("m4r");
@ -524,9 +499,6 @@ StringList FileRef::defaultFileExtensions()
l.append("aifc");
l.append("wav");
#endif
#ifdef WITH_APE
l.append("ape");
#endif
#ifdef WITH_MOD
l.append("mod");
l.append("module"); // alias for "mod"

View File

@ -2,18 +2,6 @@ SET(test_HDR_DIRS
${CMAKE_CURRENT_SOURCE_DIR}/../taglib
${CMAKE_CURRENT_SOURCE_DIR}/../taglib/toolkit
${CMAKE_CURRENT_SOURCE_DIR}/../bindings/c
)
IF(WITH_APE)
SET(test_HDR_DIRS ${test_HDR_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}/../taglib/ape
)
ENDIF()
IF(WITH_ASF)
SET(test_HDR_DIRS ${test_HDR_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}/../taglib/asf
)
ENDIF()
SET(test_HDR_DIRS ${test_HDR_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}/../taglib/mpeg/id3v1
${CMAKE_CURRENT_SOURCE_DIR}/../taglib/mpeg/id3v2
${CMAKE_CURRENT_SOURCE_DIR}/../taglib/mpeg/id3v2/frames
@ -21,7 +9,14 @@ SET(test_HDR_DIRS ${test_HDR_DIRS}
)
IF(WITH_APE)
SET(test_HDR_DIRS ${test_HDR_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}/../taglib/ape
${CMAKE_CURRENT_SOURCE_DIR}/../taglib/mpc
${CMAKE_CURRENT_SOURCE_DIR}/../taglib/wavpack
)
ENDIF()
IF(WITH_ASF)
SET(test_HDR_DIRS ${test_HDR_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}/../taglib/asf
)
ENDIF()
IF(WITH_MP4)
@ -51,11 +46,6 @@ IF(WITH_VORBIS)
${CMAKE_CURRENT_SOURCE_DIR}/../taglib/flac
)
ENDIF()
IF(WITH_APE)
SET(test_HDR_DIRS ${test_HDR_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}/../taglib/wavpack
)
ENDIF()
IF(WITH_MOD)
SET(test_HDR_DIRS ${test_HDR_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}/../taglib/mod
@ -83,13 +73,6 @@ SET(test_runner_SRCS
test_map.cpp
test_mpeg.cpp
test_synchdata.cpp
)
IF(WITH_TRUEAUDIO)
SET(test_runner_SRCS ${test_runner_SRCS}
test_trueaudio.cpp
)
ENDIF()
SET(test_runner_SRCS ${test_runner_SRCS}
test_bytevector.cpp
test_bytevectorlist.cpp
test_bytevectorstream.cpp
@ -99,47 +82,43 @@ SET(test_runner_SRCS ${test_runner_SRCS}
test_complexproperties.cpp
test_file.cpp
test_fileref.cpp
)
SET(test_runner_SRCS ${test_runner_SRCS}
test_id3v1.cpp
test_id3v2.cpp
test_id3v2framefactory.cpp
test_sizes.cpp
test_versionnumber.cpp
)
IF(WITH_TRUEAUDIO)
SET(test_runner_SRCS ${test_runner_SRCS}
test_trueaudio.cpp
)
ENDIF()
IF(WITH_VORBIS)
SET(test_runner_SRCS ${test_runner_SRCS}
test_xiphcomment.cpp
test_ogg.cpp
test_oggflac.cpp
test_flac.cpp
test_flacpicture.cpp
test_flacunknownmetadatablock.cpp
test_opus.cpp
test_speex.cpp
)
ENDIF()
IF(WITH_RIFF)
SET(test_runner_SRCS ${test_runner_SRCS}
test_aiff.cpp
test_riff.cpp
)
ENDIF()
IF(WITH_VORBIS)
SET(test_runner_SRCS ${test_runner_SRCS}
test_ogg.cpp
test_oggflac.cpp
test_flac.cpp
test_flacpicture.cpp
test_flacunknownmetadatablock.cpp
test_wav.cpp
test_info.cpp
)
ENDIF()
if(WITH_APE)
SET(test_runner_SRCS ${test_runner_SRCS}
test_ape.cpp
test_apetag.cpp
)
ENDIF()
IF(WITH_RIFF)
SET(test_runner_SRCS ${test_runner_SRCS}
test_wav.cpp
test_info.cpp
)
ENDIF()
IF(WITH_APE)
SET(test_runner_SRCS ${test_runner_SRCS}
test_wavpack.cpp
test_mpc.cpp
)
ENDIF()
IF(WITH_MP4)
@ -154,7 +133,7 @@ IF(WITH_ASF)
test_asf.cpp
)
ENDIF()
IF(WITH_MOD)
IF(WITH_MOD)
SET(test_runner_SRCS ${test_runner_SRCS}
test_mod.cpp
test_s3m.cpp
@ -162,17 +141,6 @@ ENDIF()
test_xm.cpp
)
ENDIF()
IF(WITH_APE)
SET(test_runner_SRCS ${test_runner_SRCS}
test_mpc.cpp
)
ENDIF()
IF(WITH_VORBIS)
SET(test_runner_SRCS ${test_runner_SRCS}
test_opus.cpp
test_speex.cpp
)
ENDIF()
IF(WITH_DSF)
SET(test_runner_SRCS ${test_runner_SRCS}
test_dsf.cpp
@ -184,10 +152,6 @@ IF(WITH_SHORTEN)
test_shorten.cpp
)
ENDIF()
SET(test_runner_SRCS ${test_runner_SRCS}
test_sizes.cpp
test_versionnumber.cpp
)
IF(BUILD_BINDINGS)
SET(test_runner_SRCS ${test_runner_SRCS}
test_tag_c.cpp

View File

@ -27,33 +27,29 @@
#include "config.h"
#endif
#ifdef WITH_ASF
#include "asfpicture.h"
#endif
#ifdef WITH_VORBIS
#include "flacpicture.h"
#include "flacfile.h"
#endif
#include "tbytevector.h"
#include "tvariant.h"
#include "tzlib.h"
#include "fileref.h"
#ifdef WITH_APE
#include "apetag.h"
#endif
#ifdef WITH_ASF
#include "asftag.h"
#endif
#ifdef WITH_MP4
#include "mp4tag.h"
#endif
#ifdef WITH_VORBIS
#include "xiphcomment.h"
#endif
#include "id3v1tag.h"
#include "id3v2tag.h"
#include "attachedpictureframe.h"
#include "generalencapsulatedobjectframe.h"
#ifdef WITH_ASF
#include "asfpicture.h"
#include "asftag.h"
#endif
#ifdef WITH_VORBIS
#include "flacpicture.h"
#include "flacfile.h"
#include "xiphcomment.h"
#endif
#ifdef WITH_APE
#include "apetag.h"
#endif
#ifdef WITH_MP4
#include "mp4tag.h"
#endif
#include <cppunit/extensions/HelperMacros.h>
#include "utils.h"
@ -85,29 +81,25 @@ class TestComplexProperties : public CppUnit::TestFixture
{
CPPUNIT_TEST_SUITE(TestComplexProperties);
CPPUNIT_TEST(testReadMp3Picture);
CPPUNIT_TEST(testSetGetId3Geob);
CPPUNIT_TEST(testSetGetId3Picture);
CPPUNIT_TEST(testNonExistent);
#ifdef WITH_MP4
CPPUNIT_TEST(testReadM4aPicture);
CPPUNIT_TEST(testSetGetMp4Picture);
#endif
#ifdef WITH_VORBIS
CPPUNIT_TEST(testReadOggPicture);
CPPUNIT_TEST(testReadWriteFlacPicture);
CPPUNIT_TEST(testReadWriteMultipleProperties);
CPPUNIT_TEST(testSetGetXiphPicture);
#endif
CPPUNIT_TEST(testSetGetId3Geob);
CPPUNIT_TEST(testSetGetId3Picture);
#ifdef WITH_APE
CPPUNIT_TEST(testSetGetApePicture);
#endif
#ifdef WITH_ASF
CPPUNIT_TEST(testSetGetAsfPicture);
#endif
#ifdef WITH_MP4
CPPUNIT_TEST(testSetGetMp4Picture);
#endif
#ifdef WITH_VORBIS
CPPUNIT_TEST(testSetGetXiphPicture);
#endif
CPPUNIT_TEST(testNonExistent);
CPPUNIT_TEST_SUITE_END();
public:

View File

@ -34,21 +34,22 @@
#include "tbytevectorstream.h"
#include "tag.h"
#include "fileref.h"
#include "mpegfile.h"
#ifdef WITH_VORBIS
#include "oggflacfile.h"
#include "vorbisfile.h"
#include "speexfile.h"
#include "flacfile.h"
#include "opusfile.h"
#endif
#include "mpegfile.h"
#ifdef WITH_APE
#include "mpcfile.h"
#include "apefile.h"
#include "wavpackfile.h"
#endif
#ifdef WITH_ASF
#include "asffile.h"
#endif
#ifdef WITH_VORBIS
#include "speexfile.h"
#include "flacfile.h"
#endif
#ifdef WITH_TRUEAUDIO
#include "trueaudiofile.h"
#endif
@ -57,19 +58,8 @@
#endif
#ifdef WITH_RIFF
#include "wavfile.h"
#endif
#ifdef WITH_APE
#include "apefile.h"
#endif
#ifdef WITH_RIFF
#include "aifffile.h"
#endif
#ifdef WITH_APE
#include "wavpackfile.h"
#endif
#ifdef WITH_VORBIS
#include "opusfile.h"
#endif
#ifdef WITH_MOD
#include "xmfile.h"
#endif
@ -116,21 +106,26 @@ namespace
class TestFileRef : public CppUnit::TestFixture
{
CPPUNIT_TEST_SUITE(TestFileRef);
CPPUNIT_TEST(testMP3);
CPPUNIT_TEST(testUnsupported);
CPPUNIT_TEST(testAudioProperties);
CPPUNIT_TEST(testDefaultFileExtensions);
CPPUNIT_TEST(testFileResolver);
#ifdef WITH_ASF
CPPUNIT_TEST(testASF);
#endif
#ifdef WITH_APE
CPPUNIT_TEST(testMusepack);
CPPUNIT_TEST(testAPE);
CPPUNIT_TEST(testWavPack);
#endif
#ifdef WITH_VORBIS
CPPUNIT_TEST(testVorbis);
CPPUNIT_TEST(testSpeex);
CPPUNIT_TEST(testFLAC);
#endif
CPPUNIT_TEST(testMP3);
#ifdef WITH_VORBIS
CPPUNIT_TEST(testOGA_FLAC);
CPPUNIT_TEST(testOGA_Vorbis);
CPPUNIT_TEST(testOpus);
#endif
#ifdef WITH_MP4
CPPUNIT_TEST(testMP4_1);
@ -141,28 +136,15 @@ class TestFileRef : public CppUnit::TestFixture
#ifdef WITH_TRUEAUDIO
CPPUNIT_TEST(testTrueAudio);
#endif
#ifdef WITH_APE
CPPUNIT_TEST(testAPE);
#endif
#ifdef WITH_RIFF
CPPUNIT_TEST(testWav);
CPPUNIT_TEST(testAIFF_1);
CPPUNIT_TEST(testAIFF_2);
#endif
#ifdef WITH_APE
CPPUNIT_TEST(testWavPack);
#endif
#ifdef WITH_VORBIS
CPPUNIT_TEST(testOpus);
#endif
#ifdef WITH_DSF
CPPUNIT_TEST(testDSF);
CPPUNIT_TEST(testDSDIFF);
#endif
CPPUNIT_TEST(testUnsupported);
CPPUNIT_TEST(testAudioProperties);
CPPUNIT_TEST(testDefaultFileExtensions);
CPPUNIT_TEST(testFileResolver);
CPPUNIT_TEST_SUITE_END();
public:

View File

@ -30,14 +30,15 @@
#include <functional>
#include <memory>
#ifdef WITH_VORBIS
#include "flacproperties.h"
#endif
#include "mpegproperties.h"
#include "tbytevector.h"
#include "tpropertymap.h"
#include "mpegfile.h"
#include "id3v2tag.h"
#include "id3v2frame.h"
#include "id3v2framefactory.h"
#ifdef WITH_VORBIS
#include "flacproperties.h"
#include "flacfile.h"
#endif
#ifdef WITH_TRUEAUDIO
@ -52,9 +53,6 @@
#include "dsffile.h"
#include "dsdifffile.h"
#endif
#include "id3v2tag.h"
#include "id3v2frame.h"
#include "id3v2framefactory.h"
#include <cppunit/extensions/HelperMacros.h>
#include "utils.h"

View File

@ -29,14 +29,14 @@
#include "tpropertymap.h"
#include "tag.h"
#include "id3v1tag.h"
#include "id3v2tag.h"
#ifdef WITH_APE
#include "apetag.h"
#endif
#ifdef WITH_ASF
#include "asftag.h"
#endif
#include "id3v1tag.h"
#include "id3v2tag.h"
#ifdef WITH_RIFF
#include "infotag.h"
#endif
@ -55,14 +55,15 @@ class TestPropertyMap : public CppUnit::TestFixture
{
CPPUNIT_TEST_SUITE(TestPropertyMap);
CPPUNIT_TEST(testInvalidKeys);
CPPUNIT_TEST(testGetSetId3v1);
CPPUNIT_TEST(testGetSetId3v2);
CPPUNIT_TEST(testGetSet);
#ifdef WITH_APE
CPPUNIT_TEST(testGetSetApe);
#endif
#ifdef WITH_ASF
CPPUNIT_TEST(testGetSetAsf);
#endif
CPPUNIT_TEST(testGetSetId3v1);
CPPUNIT_TEST(testGetSetId3v2);
#ifdef WITH_RIFF
CPPUNIT_TEST(testGetSetInfo);
#endif
@ -72,7 +73,6 @@ class TestPropertyMap : public CppUnit::TestFixture
#ifdef WITH_VORBIS
CPPUNIT_TEST(testGetSetXiphComment);
#endif
CPPUNIT_TEST(testGetSet);
CPPUNIT_TEST_SUITE_END();
public:

View File

@ -29,9 +29,56 @@
#include <cstring>
#include "tag.h"
#include "tbytevector.h"
#include "tbytevectorlist.h"
#include "tbytevectorstream.h"
#include "tdebuglistener.h"
#include "tfile.h"
#include "tfilestream.h"
#include "tiostream.h"
#include "tlist.h"
#include "tmap.h"
#include "tpropertymap.h"
#include "tstring.h"
#include "tstringlist.h"
#include "fileref.h"
#include "mpegfile.h"
#include "mpegheader.h"
#include "mpegproperties.h"
#include "xingheader.h"
#include "id3v1tag.h"
#include "id3v2extendedheader.h"
#include "id3v2footer.h"
#include "id3v2frame.h"
#include "id3v2framefactory.h"
#include "id3v2header.h"
#include "id3v2tag.h"
#include "attachedpictureframe.h"
#include "audioproperties.h"
#include "chapterframe.h"
#include "commentsframe.h"
#include "eventtimingcodesframe.h"
#include "generalencapsulatedobjectframe.h"
#include "ownershipframe.h"
#include "podcastframe.h"
#include "popularimeterframe.h"
#include "privateframe.h"
#include "relativevolumeframe.h"
#include "synchronizedlyricsframe.h"
#include "tableofcontentsframe.h"
#include "textidentificationframe.h"
#include "uniquefileidentifierframe.h"
#include "unknownframe.h"
#include "unsynchronizedlyricsframe.h"
#include "urllinkframe.h"
#ifdef WITH_RIFF
#include "aifffile.h"
#include "aiffproperties.h"
#include "infotag.h"
#include "rifffile.h"
#include "wavfile.h"
#include "wavproperties.h"
#endif
#ifdef WITH_APE
#include "apefile.h"
@ -39,6 +86,10 @@
#include "apeitem.h"
#include "apeproperties.h"
#include "apetag.h"
#include "mpcfile.h"
#include "mpcproperties.h"
#include "wavpackfile.h"
#include "wavpackproperties.h"
#endif
#ifdef WITH_ASF
#include "asfattribute.h"
@ -47,35 +98,29 @@
#include "asfproperties.h"
#include "asftag.h"
#endif
#include "attachedpictureframe.h"
#include "audioproperties.h"
#include "chapterframe.h"
#include "commentsframe.h"
#ifdef WITH_DSF
#include "dsffile.h"
#include "dsfproperties.h"
#include "dsdifffile.h"
#include "dsdiffproperties.h"
#endif
#include "eventtimingcodesframe.h"
#include "fileref.h"
#ifdef WITH_VORBIS
#include "flacfile.h"
#include "flacmetadatablock.h"
#include "flacunknownmetadatablock.h"
#include "flacpicture.h"
#include "flacproperties.h"
#endif
#include "generalencapsulatedobjectframe.h"
#include "id3v1tag.h"
#include "id3v2extendedheader.h"
#include "id3v2footer.h"
#include "id3v2frame.h"
#include "id3v2framefactory.h"
#include "id3v2header.h"
#include "id3v2tag.h"
#ifdef WITH_RIFF
#include "infotag.h"
#include "oggfile.h"
#include "oggflacfile.h"
#include "oggpage.h"
#include "oggpageheader.h"
#include "opusfile.h"
#include "opusproperties.h"
#include "speexfile.h"
#include "speexproperties.h"
#include "vorbisfile.h"
#include "vorbisproperties.h"
#include "xiphcomment.h"
#endif
#ifdef WITH_MOD
#include "itfile.h"
@ -84,6 +129,10 @@
#include "modfilebase.h"
#include "modproperties.h"
#include "modtag.h"
#include "s3mfile.h"
#include "s3mproperties.h"
#include "xmfile.h"
#include "xmproperties.h"
#endif
#ifdef WITH_MP4
#include "mp4coverart.h"
@ -93,88 +142,15 @@
#include "mp4properties.h"
#include "mp4tag.h"
#endif
#ifdef WITH_APE
#include "mpcfile.h"
#include "mpcproperties.h"
#endif
#include "mpegfile.h"
#include "mpegheader.h"
#include "mpegproperties.h"
#ifdef WITH_VORBIS
#include "oggfile.h"
#include "oggflacfile.h"
#include "oggpage.h"
#include "oggpageheader.h"
#include "opusfile.h"
#include "opusproperties.h"
#endif
#include "ownershipframe.h"
#include "podcastframe.h"
#include "popularimeterframe.h"
#include "privateframe.h"
#include "relativevolumeframe.h"
#ifdef WITH_RIFF
#include "rifffile.h"
#endif
#ifdef WITH_MOD
#include "s3mfile.h"
#include "s3mproperties.h"
#endif
#ifdef WITH_SHORTEN
#include "shortenfile.h"
#include "shortenproperties.h"
#include "shortentag.h"
#endif
#ifdef WITH_VORBIS
#include "speexfile.h"
#include "speexproperties.h"
#endif
#include "synchronizedlyricsframe.h"
#include "tableofcontentsframe.h"
#include "tag.h"
#include "tbytevector.h"
#include "tbytevectorlist.h"
#include "tbytevectorstream.h"
#include "tdebuglistener.h"
#include "textidentificationframe.h"
#include "tfile.h"
#include "tfilestream.h"
#include "tiostream.h"
#include "tlist.h"
#include "tmap.h"
#include "tpropertymap.h"
#ifdef WITH_TRUEAUDIO
#include "trueaudiofile.h"
#include "trueaudioproperties.h"
#endif
#include "tstring.h"
#include "tstringlist.h"
#include "uniquefileidentifierframe.h"
#include "unknownframe.h"
#include "unsynchronizedlyricsframe.h"
#include "urllinkframe.h"
#ifdef WITH_VORBIS
#include "vorbisfile.h"
#include "vorbisproperties.h"
#endif
#ifdef WITH_RIFF
#include "wavfile.h"
#endif
#ifdef WITH_APE
#include "wavpackfile.h"
#include "wavpackproperties.h"
#endif
#ifdef WITH_RIFF
#include "wavproperties.h"
#endif
#include "xingheader.h"
#ifdef WITH_VORBIS
#include "xiphcomment.h"
#endif
#ifdef WITH_MOD
#include "xmfile.h"
#include "xmproperties.h"
#endif
#include <cppunit/extensions/HelperMacros.h>
@ -193,43 +169,11 @@ public:
// Class list was built by generating XML docs with Doxygen, and then running:
// $ grep kind=\"class\" index.xml | sed -E -e 's/(.*<name>|<\/name>.*)//g'
#ifdef WITH_APE
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::APE::File));
CPPUNIT_ASSERT_EQUAL(classSize(0, false), sizeof(TagLib::APE::Footer));
CPPUNIT_ASSERT_EQUAL(classSize(0, false), sizeof(TagLib::APE::Item));
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::APE::Properties));
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::APE::Tag));
#endif
#ifdef WITH_ASF
CPPUNIT_ASSERT_EQUAL(classSize(1, false), sizeof(TagLib::ASF::Attribute));
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::ASF::File));
CPPUNIT_ASSERT_EQUAL(classSize(1, false), sizeof(TagLib::ASF::Picture));
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::ASF::Properties));
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::ASF::Tag));
#endif
CPPUNIT_ASSERT_EQUAL(classSize(0, true), sizeof(TagLib::AudioProperties));
CPPUNIT_ASSERT_EQUAL(classSize(0, false), sizeof(TagLib::ByteVector));
CPPUNIT_ASSERT_EQUAL(classSize(2, false), sizeof(TagLib::ByteVectorList));
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::ByteVectorStream));
CPPUNIT_ASSERT_EQUAL(classSize(0, true), sizeof(TagLib::DebugListener));
#ifdef WITH_DSF
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::DSDIFF::DIIN::Tag));
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::DSDIFF::File));
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::DSDIFF::Properties));
#endif
#ifdef WITH_VORBIS
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::FLAC::File));
#endif
#ifdef WITH_DSF
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::DSF::File));
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::DSF::Properties));
#endif
#ifdef WITH_VORBIS
CPPUNIT_ASSERT_EQUAL(classSize(0, true), sizeof(TagLib::FLAC::MetadataBlock));
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::FLAC::Picture));
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::FLAC::Properties));
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::FLAC::UnknownMetadataBlock));
#endif
CPPUNIT_ASSERT_EQUAL(classSize(0, true), sizeof(TagLib::File));
CPPUNIT_ASSERT_EQUAL(classSize(1, false), sizeof(TagLib::FileRef));
CPPUNIT_ASSERT_EQUAL(classSize(0, true), sizeof(TagLib::FileRef::FileTypeResolver));
@ -265,35 +209,47 @@ public:
CPPUNIT_ASSERT_EQUAL(classSize(2, true), sizeof(TagLib::ID3v2::UserTextIdentificationFrame));
CPPUNIT_ASSERT_EQUAL(classSize(2, true), sizeof(TagLib::ID3v2::UserUrlLinkFrame));
CPPUNIT_ASSERT_EQUAL(classSize(0, true), sizeof(TagLib::IOStream));
#ifdef WITH_MOD
CPPUNIT_ASSERT_EQUAL(classSize(2, true), sizeof(TagLib::IT::File));
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::IT::Properties));
#endif
CPPUNIT_ASSERT_EQUAL(classSize(1, false), sizeof(TagLib::List<int>));
#ifdef WITH_MP4
CPPUNIT_ASSERT_EQUAL(classSize(1, false), sizeof(TagLib::MP4::CoverArt));
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::MP4::File));
CPPUNIT_ASSERT_EQUAL(classSize(1, false), sizeof(TagLib::MP4::Item));
CPPUNIT_ASSERT_EQUAL(classSize(0, true), sizeof(TagLib::MP4::ItemFactory));
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::MP4::Properties));
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::MP4::Tag));
#endif
#ifdef WITH_APE
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::MPC::File));
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::MPC::Properties));
#endif
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::MPEG::File));
CPPUNIT_ASSERT_EQUAL(classSize(1, false), sizeof(TagLib::MPEG::Header));
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::MPEG::Properties));
CPPUNIT_ASSERT_EQUAL(classSize(0, false), sizeof(TagLib::MPEG::XingHeader));
CPPUNIT_ASSERT_EQUAL(classSize(1, false), sizeof(TagLib::Map<int, int>));
#ifdef WITH_MOD
CPPUNIT_ASSERT_EQUAL(classSize(2, true), sizeof(TagLib::Mod::File));
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::Mod::FileBase));
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::Mod::Properties));
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::Mod::Tag));
CPPUNIT_ASSERT_EQUAL(classSize(2, false), sizeof(TagLib::PropertyMap));
CPPUNIT_ASSERT_EQUAL(classSize(1, false), sizeof(TagLib::String));
CPPUNIT_ASSERT_EQUAL(classSize(2, false), sizeof(TagLib::StringList));
CPPUNIT_ASSERT_EQUAL(classSize(0, true), sizeof(TagLib::Tag));
#ifdef WITH_APE
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::APE::File));
CPPUNIT_ASSERT_EQUAL(classSize(0, false), sizeof(TagLib::APE::Footer));
CPPUNIT_ASSERT_EQUAL(classSize(0, false), sizeof(TagLib::APE::Item));
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::APE::Properties));
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::APE::Tag));
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::MPC::File));
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::MPC::Properties));
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::WavPack::File));
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::WavPack::Properties));
#endif
#ifdef WITH_ASF
CPPUNIT_ASSERT_EQUAL(classSize(1, false), sizeof(TagLib::ASF::Attribute));
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::ASF::File));
CPPUNIT_ASSERT_EQUAL(classSize(1, false), sizeof(TagLib::ASF::Picture));
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::ASF::Properties));
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::ASF::Tag));
#endif
#ifdef WITH_DSF
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::DSDIFF::DIIN::Tag));
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::DSDIFF::File));
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::DSDIFF::Properties));
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::DSF::File));
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::DSF::Properties));
#endif
#ifdef WITH_VORBIS
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::FLAC::File));
CPPUNIT_ASSERT_EQUAL(classSize(0, true), sizeof(TagLib::FLAC::MetadataBlock));
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::FLAC::Picture));
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::FLAC::Properties));
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::FLAC::UnknownMetadataBlock));
CPPUNIT_ASSERT_EQUAL(classSize(2, true), sizeof(TagLib::Ogg::FLAC::File));
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::Ogg::File));
CPPUNIT_ASSERT_EQUAL(classSize(2, true), sizeof(TagLib::Ogg::Opus::File));
@ -306,7 +262,27 @@ public:
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::Ogg::Vorbis::Properties));
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::Ogg::XiphComment));
#endif
CPPUNIT_ASSERT_EQUAL(classSize(2, false), sizeof(TagLib::PropertyMap));
#ifdef WITH_MOD
CPPUNIT_ASSERT_EQUAL(classSize(2, true), sizeof(TagLib::IT::File));
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::IT::Properties));
CPPUNIT_ASSERT_EQUAL(classSize(2, true), sizeof(TagLib::Mod::File));
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::Mod::FileBase));
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::Mod::Properties));
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::Mod::Tag));
CPPUNIT_ASSERT_EQUAL(classSize(2, true), sizeof(TagLib::S3M::File));
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::S3M::Properties));
CPPUNIT_ASSERT_EQUAL(classSize(2, true), sizeof(TagLib::XM::File));
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::XM::Properties));
CPPUNIT_ASSERT_EQUAL(classSize(1, false), sizeof(TagLib::Variant));
#endif
#ifdef WITH_MP4
CPPUNIT_ASSERT_EQUAL(classSize(1, false), sizeof(TagLib::MP4::CoverArt));
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::MP4::File));
CPPUNIT_ASSERT_EQUAL(classSize(1, false), sizeof(TagLib::MP4::Item));
CPPUNIT_ASSERT_EQUAL(classSize(0, true), sizeof(TagLib::MP4::ItemFactory));
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::MP4::Properties));
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::MP4::Tag));
#endif
#ifdef WITH_RIFF
CPPUNIT_ASSERT_EQUAL(classSize(2, true), sizeof(TagLib::RIFF::AIFF::File));
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::RIFF::AIFF::Properties));
@ -316,30 +292,14 @@ public:
CPPUNIT_ASSERT_EQUAL(classSize(2, true), sizeof(TagLib::RIFF::WAV::File));
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::RIFF::WAV::Properties));
#endif
#ifdef WITH_MOD
CPPUNIT_ASSERT_EQUAL(classSize(2, true), sizeof(TagLib::S3M::File));
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::S3M::Properties));
#endif
#ifdef WITH_SHORTEN
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::Shorten::File));
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::Shorten::Properties));
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::Shorten::Tag));
#endif
CPPUNIT_ASSERT_EQUAL(classSize(1, false), sizeof(TagLib::String));
CPPUNIT_ASSERT_EQUAL(classSize(2, false), sizeof(TagLib::StringList));
CPPUNIT_ASSERT_EQUAL(classSize(0, true), sizeof(TagLib::Tag));
#ifdef WITH_TRUEAUDIO
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::TrueAudio::File));
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::TrueAudio::Properties));
#endif
#ifdef WITH_APE
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::WavPack::File));
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::WavPack::Properties));
#endif
#ifdef WITH_MOD
CPPUNIT_ASSERT_EQUAL(classSize(2, true), sizeof(TagLib::XM::File));
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::XM::Properties));
CPPUNIT_ASSERT_EQUAL(classSize(1, false), sizeof(TagLib::Variant));
#endif
}