Fix TTA audio properties reading.

git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@740388 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
This commit is contained in:
Lukáš Lalinský
2007-11-23 06:54:22 +00:00
parent 5506647153
commit fed2c020fe
5 changed files with 41 additions and 4 deletions

View File

@ -7,6 +7,7 @@ INCLUDE_DIRECTORIES(
${CMAKE_CURRENT_SOURCE_DIR}/../taglib/mpeg/id3v2
${CMAKE_CURRENT_SOURCE_DIR}/../taglib/mpeg/id3v2/frames
${CMAKE_CURRENT_SOURCE_DIR}/../taglib/mpeg
${CMAKE_CURRENT_SOURCE_DIR}/../taglib/trueaudio
)
SET(test_runner_SRCS
@ -15,6 +16,7 @@ SET(test_runner_SRCS
test_map.cpp
test_mpeg.cpp
test_synchdata.cpp
test_trueaudio.cpp
test_bytevector.cpp
test_string.cpp
test_fileref.cpp

View File

@ -1,6 +1,7 @@
INCLUDES = \
-I$(top_srcdir)/taglib\
-I$(top_srcdir)/taglib/toolkit \
-I$(top_srcdir)/taglib/trueaudio \
-I$(top_srcdir)/taglib/mpeg \
-I$(top_srcdir)/taglib/mpeg/id3v1 \
-I$(top_srcdir)/taglib/mpeg/id3v2 \
@ -12,6 +13,7 @@ test_runner_SOURCES = \
test_map.cpp \
test_mpeg.cpp \
test_synchdata.cpp \
test_trueaudio.cpp \
test_bytevector.cpp \
test_string.cpp \
test_fileref.cpp \

26
tests/test_trueaudio.cpp Normal file
View File

@ -0,0 +1,26 @@
#include <cppunit/extensions/HelperMacros.h>
#include <string>
#include <stdio.h>
#include <trueaudiofile.h>
using namespace std;
using namespace TagLib;
class TestTrueAudio : public CppUnit::TestFixture
{
CPPUNIT_TEST_SUITE(TestTrueAudio);
CPPUNIT_TEST(testReadPropertiesWithoutID3v2);
CPPUNIT_TEST_SUITE_END();
public:
void testReadPropertiesWithoutID3v2()
{
TrueAudio::File f("data/empty.tta");
CPPUNIT_ASSERT(f.audioProperties());
CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->length());
}
};
CPPUNIT_TEST_SUITE_REGISTRATION(TestTrueAudio);