mirror of
https://github.com/taglib/taglib.git
synced 2025-07-18 21:14:23 -04:00
Implemented a specialized version of APE::Tag::isEmpty()
git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@1148318 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
This commit is contained in:
@ -39,6 +39,7 @@ SET(test_runner_SRCS
|
||||
test_oggflac.cpp
|
||||
test_flac.cpp
|
||||
test_ape.cpp
|
||||
test_apetag.cpp
|
||||
)
|
||||
IF(WITH_MP4)
|
||||
SET(test_runner_SRCS ${test_runner_SRCS}
|
||||
|
40
tests/test_apetag.cpp
Normal file
40
tests/test_apetag.cpp
Normal file
@ -0,0 +1,40 @@
|
||||
#include <cppunit/extensions/HelperMacros.h>
|
||||
#include <string>
|
||||
#include <stdio.h>
|
||||
#include <tag.h>
|
||||
#include <tstringlist.h>
|
||||
#include <tbytevectorlist.h>
|
||||
#include <apetag.h>
|
||||
#include "utils.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace TagLib;
|
||||
|
||||
class TestAPETag : public CppUnit::TestFixture
|
||||
{
|
||||
CPPUNIT_TEST_SUITE(TestAPETag);
|
||||
CPPUNIT_TEST(testIsEmpty);
|
||||
CPPUNIT_TEST(testIsEmpty2);
|
||||
CPPUNIT_TEST_SUITE_END();
|
||||
|
||||
public:
|
||||
|
||||
void testIsEmpty()
|
||||
{
|
||||
APE::Tag tag;
|
||||
CPPUNIT_ASSERT(tag.isEmpty());
|
||||
tag.addValue("COMPOSER", "Mike Oldfield");
|
||||
CPPUNIT_ASSERT(!tag.isEmpty());
|
||||
}
|
||||
|
||||
void testIsEmpty2()
|
||||
{
|
||||
APE::Tag tag;
|
||||
CPPUNIT_ASSERT(tag.isEmpty());
|
||||
tag.setArtist("Mike Oldfield");
|
||||
CPPUNIT_ASSERT(!tag.isEmpty());
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
CPPUNIT_TEST_SUITE_REGISTRATION(TestAPETag);
|
Reference in New Issue
Block a user