diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 62898a58..f5b80c69 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -41,7 +41,7 @@ SET(test_runner_SRCS test_flac.cpp test_ape.cpp test_apetag.cpp - #test_wav.cpp + test_wav.cpp ) IF(WITH_MP4) SET(test_runner_SRCS ${test_runner_SRCS} diff --git a/tests/test_wav.cpp b/tests/test_wav.cpp new file mode 100644 index 00000000..38a9a0fb --- /dev/null +++ b/tests/test_wav.cpp @@ -0,0 +1,28 @@ +#include +#include +#include +#include +#include +#include +#include "utils.h" + +using namespace std; +using namespace TagLib; + +class TestWAV : public CppUnit::TestFixture +{ + CPPUNIT_TEST_SUITE(TestWAV); + CPPUNIT_TEST(testLength); + CPPUNIT_TEST_SUITE_END(); + +public: + + void testLength() + { + RIFF::WAV::File f("data/empty.wav"); + CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->length()); + } + +}; + +CPPUNIT_TEST_SUITE_REGISTRATION(TestWAV);