diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_aiff.cpp | 4 | ||||
-rw-r--r-- | tests/test_ape.cpp | 5 | ||||
-rw-r--r-- | tests/test_asf.cpp | 2 | ||||
-rw-r--r-- | tests/test_bytevector.cpp | 1 | ||||
-rw-r--r-- | tests/test_flac.cpp | 2 | ||||
-rw-r--r-- | tests/test_id3v2.cpp | 34 | ||||
-rw-r--r-- | tests/test_mp4.cpp | 3 | ||||
-rw-r--r-- | tests/test_mpc.cpp | 4 | ||||
-rw-r--r-- | tests/test_mpeg.cpp | 8 | ||||
-rw-r--r-- | tests/test_ogg.cpp | 1 | ||||
-rw-r--r-- | tests/test_opus.cpp | 1 | ||||
-rw-r--r-- | tests/test_speex.cpp | 1 | ||||
-rw-r--r-- | tests/test_string.cpp | 1 | ||||
-rw-r--r-- | tests/test_trueaudio.cpp | 2 | ||||
-rw-r--r-- | tests/test_wav.cpp | 8 | ||||
-rw-r--r-- | tests/test_wavpack.cpp | 3 |
16 files changed, 24 insertions, 56 deletions
diff --git a/tests/test_aiff.cpp b/tests/test_aiff.cpp index 9619b1d8..cc7df9aa 100644 --- a/tests/test_aiff.cpp +++ b/tests/test_aiff.cpp @@ -51,14 +51,12 @@ public: { RIFF::AIFF::File f(TEST_FILE_PATH_C("empty.aiff")); CPPUNIT_ASSERT(f.audioProperties()); - CPPUNIT_ASSERT_EQUAL(0, f.audioProperties()->length()); CPPUNIT_ASSERT_EQUAL(0, f.audioProperties()->lengthInSeconds()); CPPUNIT_ASSERT_EQUAL(67, f.audioProperties()->lengthInMilliseconds()); CPPUNIT_ASSERT_EQUAL(706, f.audioProperties()->bitrate()); CPPUNIT_ASSERT_EQUAL(44100, f.audioProperties()->sampleRate()); CPPUNIT_ASSERT_EQUAL(1, f.audioProperties()->channels()); CPPUNIT_ASSERT_EQUAL(16, f.audioProperties()->bitsPerSample()); - CPPUNIT_ASSERT_EQUAL(16, f.audioProperties()->sampleWidth()); CPPUNIT_ASSERT_EQUAL(2941U, f.audioProperties()->sampleFrames()); CPPUNIT_ASSERT_EQUAL(false, f.audioProperties()->isAiffC()); } @@ -67,14 +65,12 @@ public: { RIFF::AIFF::File f(TEST_FILE_PATH_C("alaw.aifc")); CPPUNIT_ASSERT(f.audioProperties()); - CPPUNIT_ASSERT_EQUAL(0, f.audioProperties()->length()); CPPUNIT_ASSERT_EQUAL(0, f.audioProperties()->lengthInSeconds()); CPPUNIT_ASSERT_EQUAL(37, f.audioProperties()->lengthInMilliseconds()); CPPUNIT_ASSERT_EQUAL(355, f.audioProperties()->bitrate()); CPPUNIT_ASSERT_EQUAL(44100, f.audioProperties()->sampleRate()); CPPUNIT_ASSERT_EQUAL(1, f.audioProperties()->channels()); CPPUNIT_ASSERT_EQUAL(16, f.audioProperties()->bitsPerSample()); - CPPUNIT_ASSERT_EQUAL(16, f.audioProperties()->sampleWidth()); CPPUNIT_ASSERT_EQUAL(1622U, f.audioProperties()->sampleFrames()); CPPUNIT_ASSERT_EQUAL(true, f.audioProperties()->isAiffC()); CPPUNIT_ASSERT_EQUAL(ByteVector("ALAW"), f.audioProperties()->compressionType()); diff --git a/tests/test_ape.cpp b/tests/test_ape.cpp index 81f4425d..8c120483 100644 --- a/tests/test_ape.cpp +++ b/tests/test_ape.cpp @@ -57,7 +57,6 @@ public: { APE::File f(TEST_FILE_PATH_C("mac-399.ape")); CPPUNIT_ASSERT(f.audioProperties()); - CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->length()); CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->lengthInSeconds()); CPPUNIT_ASSERT_EQUAL(3550, f.audioProperties()->lengthInMilliseconds()); CPPUNIT_ASSERT_EQUAL(192, f.audioProperties()->bitrate()); @@ -72,7 +71,6 @@ public: { APE::File f(TEST_FILE_PATH_C("mac-399-tagged.ape")); CPPUNIT_ASSERT(f.audioProperties()); - CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->length()); CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->lengthInSeconds()); CPPUNIT_ASSERT_EQUAL(3550, f.audioProperties()->lengthInMilliseconds()); CPPUNIT_ASSERT_EQUAL(192, f.audioProperties()->bitrate()); @@ -87,7 +85,6 @@ public: { APE::File f(TEST_FILE_PATH_C("mac-399-id3v2.ape")); CPPUNIT_ASSERT(f.audioProperties()); - CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->length()); CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->lengthInSeconds()); CPPUNIT_ASSERT_EQUAL(3550, f.audioProperties()->lengthInMilliseconds()); CPPUNIT_ASSERT_EQUAL(192, f.audioProperties()->bitrate()); @@ -102,7 +99,6 @@ public: { APE::File f(TEST_FILE_PATH_C("mac-396.ape")); CPPUNIT_ASSERT(f.audioProperties()); - CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->length()); CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->lengthInSeconds()); CPPUNIT_ASSERT_EQUAL(3685, f.audioProperties()->lengthInMilliseconds()); CPPUNIT_ASSERT_EQUAL(0, f.audioProperties()->bitrate()); @@ -117,7 +113,6 @@ public: { APE::File f(TEST_FILE_PATH_C("mac-390-hdr.ape")); CPPUNIT_ASSERT(f.audioProperties()); - CPPUNIT_ASSERT_EQUAL(15, f.audioProperties()->length()); CPPUNIT_ASSERT_EQUAL(15, f.audioProperties()->lengthInSeconds()); CPPUNIT_ASSERT_EQUAL(15630, f.audioProperties()->lengthInMilliseconds()); CPPUNIT_ASSERT_EQUAL(0, f.audioProperties()->bitrate()); diff --git a/tests/test_asf.cpp b/tests/test_asf.cpp index 3f0eff63..e9b8dab7 100644 --- a/tests/test_asf.cpp +++ b/tests/test_asf.cpp @@ -59,7 +59,6 @@ public: { ASF::File f(TEST_FILE_PATH_C("silence-1.wma")); CPPUNIT_ASSERT(f.audioProperties()); - CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->length()); CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->lengthInSeconds()); CPPUNIT_ASSERT_EQUAL(3712, f.audioProperties()->lengthInMilliseconds()); CPPUNIT_ASSERT_EQUAL(64, f.audioProperties()->bitrate()); @@ -76,7 +75,6 @@ public: { ASF::File f(TEST_FILE_PATH_C("lossless.wma")); CPPUNIT_ASSERT(f.audioProperties()); - CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->length()); CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->lengthInSeconds()); CPPUNIT_ASSERT_EQUAL(3549, f.audioProperties()->lengthInMilliseconds()); CPPUNIT_ASSERT_EQUAL(1152, f.audioProperties()->bitrate()); diff --git a/tests/test_bytevector.cpp b/tests/test_bytevector.cpp index f03dda1a..26cde765 100644 --- a/tests/test_bytevector.cpp +++ b/tests/test_bytevector.cpp @@ -77,7 +77,6 @@ public: i.clear(); CPPUNIT_ASSERT(i.isEmpty()); - CPPUNIT_ASSERT(!i.isNull()); // deprecated, but worth it to check. } void testFind1() diff --git a/tests/test_flac.cpp b/tests/test_flac.cpp index 5bae7d88..0cc2b7ec 100644 --- a/tests/test_flac.cpp +++ b/tests/test_flac.cpp @@ -326,14 +326,12 @@ public: { FLAC::File f(TEST_FILE_PATH_C("sinewave.flac")); CPPUNIT_ASSERT(f.audioProperties()); - CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->length()); CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->lengthInSeconds()); CPPUNIT_ASSERT_EQUAL(3550, f.audioProperties()->lengthInMilliseconds()); CPPUNIT_ASSERT_EQUAL(145, f.audioProperties()->bitrate()); CPPUNIT_ASSERT_EQUAL(44100, f.audioProperties()->sampleRate()); CPPUNIT_ASSERT_EQUAL(2, f.audioProperties()->channels()); CPPUNIT_ASSERT_EQUAL(16, f.audioProperties()->bitsPerSample()); - CPPUNIT_ASSERT_EQUAL(16, f.audioProperties()->sampleWidth()); CPPUNIT_ASSERT_EQUAL(156556ULL, f.audioProperties()->sampleFrames()); CPPUNIT_ASSERT_EQUAL( ByteVector("\xcf\xe3\xd9\xda\xba\xde\xab\x2c\xbf\x2c\xa2\x35\x27\x4b\x7f\x76"), diff --git a/tests/test_id3v2.cpp b/tests/test_id3v2.cpp index d42907a5..6e5452ba 100644 --- a/tests/test_id3v2.cpp +++ b/tests/test_id3v2.cpp @@ -251,8 +251,10 @@ public: "\x01" "d\x00" "\x00", 14); + ID3v2::Header header; + header.setMajorVersion(2); ID3v2::AttachedPictureFrame *frame = - dynamic_cast<TagLib::ID3v2::AttachedPictureFrame*>(factory->createFrame(data, (unsigned int)2)); + dynamic_cast<TagLib::ID3v2::AttachedPictureFrame *>(factory->createFrame(data, &header)); CPPUNIT_ASSERT(frame); CPPUNIT_ASSERT_EQUAL(String("image/jpeg"), frame->mimeType()); @@ -272,8 +274,10 @@ public: "\x01" "d\x00" "\x00", 14); + ID3v2::Header header; + header.setMajorVersion(2); ID3v2::UnknownFrame *frame = - dynamic_cast<TagLib::ID3v2::UnknownFrame*>(factory->createFrame(data, (unsigned int)2)); + dynamic_cast<TagLib::ID3v2::UnknownFrame*>(factory->createFrame(data, &header)); CPPUNIT_ASSERT(frame); @@ -665,8 +669,10 @@ public: "\x00\x00" // Frame flags "\x00" // Encoding "(22)Death Metal", 26); // Text + ID3v2::Header header; + header.setMajorVersion(3); ID3v2::TextIdentificationFrame *frame = - dynamic_cast<TagLib::ID3v2::TextIdentificationFrame*>(factory->createFrame(data, (unsigned int)3)); + dynamic_cast<TagLib::ID3v2::TextIdentificationFrame*>(factory->createFrame(data, &header)); CPPUNIT_ASSERT_EQUAL((unsigned int)1, frame->fieldList().size()); CPPUNIT_ASSERT_EQUAL(String("Death Metal"), frame->fieldList()[0]); @@ -684,8 +690,10 @@ public: "\x00\x00" // Frame flags "\x00" // Encoding "(4)Eurodisco", 23); // Text + ID3v2::Header header; + header.setMajorVersion(3); ID3v2::TextIdentificationFrame *frame = - dynamic_cast<TagLib::ID3v2::TextIdentificationFrame*>(factory->createFrame(data, (unsigned int)3)); + dynamic_cast<TagLib::ID3v2::TextIdentificationFrame*>(factory->createFrame(data, &header)); CPPUNIT_ASSERT_EQUAL((unsigned int)2, frame->fieldList().size()); CPPUNIT_ASSERT_EQUAL(String("4"), frame->fieldList()[0]); CPPUNIT_ASSERT_EQUAL(String("Eurodisco"), frame->fieldList()[1]); @@ -703,8 +711,9 @@ public: "\x00\x00" // Frame flags "\0" // Encoding "14\0Eurodisco", 23); // Text + ID3v2::Header header; ID3v2::TextIdentificationFrame *frame = - dynamic_cast<TagLib::ID3v2::TextIdentificationFrame*>(factory->createFrame(data, (unsigned int)4)); + dynamic_cast<TagLib::ID3v2::TextIdentificationFrame*>(factory->createFrame(data, &header)); CPPUNIT_ASSERT_EQUAL((unsigned int)2, frame->fieldList().size()); CPPUNIT_ASSERT_EQUAL(String("14"), frame->fieldList()[0]); CPPUNIT_ASSERT_EQUAL(String("Eurodisco"), frame->fieldList()[1]); @@ -954,10 +963,13 @@ public: CPPUNIT_ASSERT_EQUAL(frameDataMvin, frameMvin->render()); ID3v2::FrameFactory *factory = ID3v2::FrameFactory::instance(); + ID3v2::Header header; ID3v2::TextIdentificationFrame *parsedFrameMvnm = - dynamic_cast<ID3v2::TextIdentificationFrame *>(factory->createFrame(frameDataMvnm)); + dynamic_cast<ID3v2::TextIdentificationFrame *>( + factory->createFrame(frameDataMvnm, &header)); ID3v2::TextIdentificationFrame *parsedFrameMvin = - dynamic_cast<ID3v2::TextIdentificationFrame *>(factory->createFrame(frameDataMvin)); + dynamic_cast<ID3v2::TextIdentificationFrame *>( + factory->createFrame(frameDataMvin, &header)); CPPUNIT_ASSERT(parsedFrameMvnm); CPPUNIT_ASSERT(parsedFrameMvin); CPPUNIT_ASSERT_EQUAL(String("Movement Name"), parsedFrameMvnm->toString()); @@ -986,8 +998,10 @@ public: CPPUNIT_ASSERT_EQUAL(frameDataGrp1, frameGrp1->render()); ID3v2::FrameFactory *factory = ID3v2::FrameFactory::instance(); + ID3v2::Header header; ID3v2::TextIdentificationFrame *parsedFrameGrp1 = - dynamic_cast<ID3v2::TextIdentificationFrame *>(factory->createFrame(frameDataGrp1)); + dynamic_cast<ID3v2::TextIdentificationFrame *>( + factory->createFrame(frameDataGrp1, &header)); CPPUNIT_ASSERT(parsedFrameGrp1); CPPUNIT_ASSERT_EQUAL(String("Grouping"), parsedFrameGrp1->toString()); @@ -1210,14 +1224,14 @@ public: { MPEG::File f(newname.c_str()); f.ID3v2Tag()->setTitle(longText(64 * 1024)); - f.save(MPEG::File::ID3v2, true); + f.save(MPEG::File::ID3v2, File::StripOthers); } { MPEG::File f(newname.c_str()); CPPUNIT_ASSERT(f.hasID3v2Tag()); CPPUNIT_ASSERT_EQUAL(74789L, f.length()); f.ID3v2Tag()->setTitle("ABCDEFGHIJ"); - f.save(MPEG::File::ID3v2, true); + f.save(MPEG::File::ID3v2, File::StripOthers); } { MPEG::File f(newname.c_str()); diff --git a/tests/test_mp4.cpp b/tests/test_mp4.cpp index c8d65723..05bf6bd3 100644 --- a/tests/test_mp4.cpp +++ b/tests/test_mp4.cpp @@ -67,7 +67,6 @@ public: { MP4::File f(TEST_FILE_PATH_C("has-tags.m4a")); CPPUNIT_ASSERT(f.audioProperties()); - CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->length()); CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->lengthInSeconds()); CPPUNIT_ASSERT_EQUAL(3708, f.audioProperties()->lengthInMilliseconds()); CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->bitrate()); @@ -82,7 +81,6 @@ public: { MP4::File f(TEST_FILE_PATH_C("empty_alac.m4a")); CPPUNIT_ASSERT(f.audioProperties()); - CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->length()); CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->lengthInSeconds()); CPPUNIT_ASSERT_EQUAL(3705, f.audioProperties()->lengthInMilliseconds()); CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->bitrate()); @@ -97,7 +95,6 @@ public: { MP4::File f(TEST_FILE_PATH_C("blank_video.m4v")); CPPUNIT_ASSERT(f.audioProperties()); - CPPUNIT_ASSERT_EQUAL(0, f.audioProperties()->length()); CPPUNIT_ASSERT_EQUAL(0, f.audioProperties()->lengthInSeconds()); CPPUNIT_ASSERT_EQUAL(975, f.audioProperties()->lengthInMilliseconds()); CPPUNIT_ASSERT_EQUAL(96, f.audioProperties()->bitrate()); diff --git a/tests/test_mpc.cpp b/tests/test_mpc.cpp index d8ed984e..059e521f 100644 --- a/tests/test_mpc.cpp +++ b/tests/test_mpc.cpp @@ -59,7 +59,6 @@ public: MPC::File f(TEST_FILE_PATH_C("sv8_header.mpc")); CPPUNIT_ASSERT(f.audioProperties()); CPPUNIT_ASSERT_EQUAL(8, f.audioProperties()->mpcVersion()); - CPPUNIT_ASSERT_EQUAL(1, f.audioProperties()->length()); CPPUNIT_ASSERT_EQUAL(1, f.audioProperties()->lengthInSeconds()); CPPUNIT_ASSERT_EQUAL(1497, f.audioProperties()->lengthInMilliseconds()); CPPUNIT_ASSERT_EQUAL(1, f.audioProperties()->bitrate()); @@ -73,7 +72,6 @@ public: MPC::File f(TEST_FILE_PATH_C("click.mpc")); CPPUNIT_ASSERT(f.audioProperties()); CPPUNIT_ASSERT_EQUAL(7, f.audioProperties()->mpcVersion()); - CPPUNIT_ASSERT_EQUAL(0, f.audioProperties()->length()); CPPUNIT_ASSERT_EQUAL(0, f.audioProperties()->lengthInSeconds()); CPPUNIT_ASSERT_EQUAL(40, f.audioProperties()->lengthInMilliseconds()); CPPUNIT_ASSERT_EQUAL(318, f.audioProperties()->bitrate()); @@ -91,7 +89,6 @@ public: MPC::File f(TEST_FILE_PATH_C("sv5_header.mpc")); CPPUNIT_ASSERT(f.audioProperties()); CPPUNIT_ASSERT_EQUAL(5, f.audioProperties()->mpcVersion()); - CPPUNIT_ASSERT_EQUAL(26, f.audioProperties()->length()); CPPUNIT_ASSERT_EQUAL(26, f.audioProperties()->lengthInSeconds()); CPPUNIT_ASSERT_EQUAL(26371, f.audioProperties()->lengthInMilliseconds()); CPPUNIT_ASSERT_EQUAL(0, f.audioProperties()->bitrate()); @@ -105,7 +102,6 @@ public: MPC::File f(TEST_FILE_PATH_C("sv4_header.mpc")); CPPUNIT_ASSERT(f.audioProperties()); CPPUNIT_ASSERT_EQUAL(4, f.audioProperties()->mpcVersion()); - CPPUNIT_ASSERT_EQUAL(26, f.audioProperties()->length()); CPPUNIT_ASSERT_EQUAL(26, f.audioProperties()->lengthInSeconds()); CPPUNIT_ASSERT_EQUAL(26371, f.audioProperties()->lengthInMilliseconds()); CPPUNIT_ASSERT_EQUAL(0, f.audioProperties()->bitrate()); diff --git a/tests/test_mpeg.cpp b/tests/test_mpeg.cpp index 45d60ece..240231a4 100644 --- a/tests/test_mpeg.cpp +++ b/tests/test_mpeg.cpp @@ -73,7 +73,6 @@ public: { MPEG::File f(TEST_FILE_PATH_C("lame_cbr.mp3")); CPPUNIT_ASSERT(f.audioProperties()); - CPPUNIT_ASSERT_EQUAL(1887, f.audioProperties()->length()); CPPUNIT_ASSERT_EQUAL(1887, f.audioProperties()->lengthInSeconds()); CPPUNIT_ASSERT_EQUAL(1887164, f.audioProperties()->lengthInMilliseconds()); CPPUNIT_ASSERT_EQUAL(64, f.audioProperties()->bitrate()); @@ -86,7 +85,6 @@ public: { MPEG::File f(TEST_FILE_PATH_C("lame_vbr.mp3")); CPPUNIT_ASSERT(f.audioProperties()); - CPPUNIT_ASSERT_EQUAL(1887, f.audioProperties()->length()); CPPUNIT_ASSERT_EQUAL(1887, f.audioProperties()->lengthInSeconds()); CPPUNIT_ASSERT_EQUAL(1887164, f.audioProperties()->lengthInMilliseconds()); CPPUNIT_ASSERT_EQUAL(70, f.audioProperties()->bitrate()); @@ -99,7 +97,6 @@ public: { MPEG::File f(TEST_FILE_PATH_C("rare_frames.mp3")); CPPUNIT_ASSERT(f.audioProperties()); - CPPUNIT_ASSERT_EQUAL(222, f.audioProperties()->length()); CPPUNIT_ASSERT_EQUAL(222, f.audioProperties()->lengthInSeconds()); CPPUNIT_ASSERT_EQUAL(222198, f.audioProperties()->lengthInMilliseconds()); CPPUNIT_ASSERT_EQUAL(233, f.audioProperties()->bitrate()); @@ -112,7 +109,6 @@ public: { MPEG::File f(TEST_FILE_PATH_C("bladeenc.mp3")); CPPUNIT_ASSERT(f.audioProperties()); - CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->length()); CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->lengthInSeconds()); CPPUNIT_ASSERT_EQUAL(3553, f.audioProperties()->lengthInMilliseconds()); CPPUNIT_ASSERT_EQUAL(64, f.audioProperties()->bitrate()); @@ -131,7 +127,6 @@ public: { MPEG::File f(TEST_FILE_PATH_C("invalid-frames1.mp3")); CPPUNIT_ASSERT(f.audioProperties()); - CPPUNIT_ASSERT_EQUAL(0, f.audioProperties()->length()); CPPUNIT_ASSERT_EQUAL(0, f.audioProperties()->lengthInSeconds()); CPPUNIT_ASSERT_EQUAL(392, f.audioProperties()->lengthInMilliseconds()); CPPUNIT_ASSERT_EQUAL(160, f.audioProperties()->bitrate()); @@ -144,7 +139,6 @@ public: { MPEG::File f(TEST_FILE_PATH_C("invalid-frames2.mp3")); CPPUNIT_ASSERT(f.audioProperties()); - CPPUNIT_ASSERT_EQUAL(0, f.audioProperties()->length()); CPPUNIT_ASSERT_EQUAL(0, f.audioProperties()->lengthInSeconds()); CPPUNIT_ASSERT_EQUAL(314, f.audioProperties()->lengthInMilliseconds()); CPPUNIT_ASSERT_EQUAL(192, f.audioProperties()->bitrate()); @@ -157,7 +151,6 @@ public: { MPEG::File f(TEST_FILE_PATH_C("invalid-frames3.mp3")); CPPUNIT_ASSERT(f.audioProperties()); - CPPUNIT_ASSERT_EQUAL(0, f.audioProperties()->length()); CPPUNIT_ASSERT_EQUAL(0, f.audioProperties()->lengthInSeconds()); CPPUNIT_ASSERT_EQUAL(183, f.audioProperties()->lengthInMilliseconds()); CPPUNIT_ASSERT_EQUAL(320, f.audioProperties()->bitrate()); @@ -170,7 +163,6 @@ public: { MPEG::File f(TEST_FILE_PATH_C("mpeg2.mp3")); CPPUNIT_ASSERT(f.audioProperties()); - CPPUNIT_ASSERT_EQUAL(5387, f.audioProperties()->length()); CPPUNIT_ASSERT_EQUAL(5387, f.audioProperties()->lengthInSeconds()); CPPUNIT_ASSERT_EQUAL(5387285, f.audioProperties()->lengthInMilliseconds()); } diff --git a/tests/test_ogg.cpp b/tests/test_ogg.cpp index ebb865fd..6564a247 100644 --- a/tests/test_ogg.cpp +++ b/tests/test_ogg.cpp @@ -188,7 +188,6 @@ public: { Ogg::Vorbis::File f(TEST_FILE_PATH_C("empty.ogg")); CPPUNIT_ASSERT(f.audioProperties()); - CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->length()); CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->lengthInSeconds()); CPPUNIT_ASSERT_EQUAL(3685, f.audioProperties()->lengthInMilliseconds()); CPPUNIT_ASSERT_EQUAL(1, f.audioProperties()->bitrate()); diff --git a/tests/test_opus.cpp b/tests/test_opus.cpp index cdf77eae..9a49d239 100644 --- a/tests/test_opus.cpp +++ b/tests/test_opus.cpp @@ -50,7 +50,6 @@ public: { Ogg::Opus::File f(TEST_FILE_PATH_C("correctness_gain_silent_output.opus")); CPPUNIT_ASSERT(f.audioProperties()); - CPPUNIT_ASSERT_EQUAL(7, f.audioProperties()->length()); CPPUNIT_ASSERT_EQUAL(7, f.audioProperties()->lengthInSeconds()); CPPUNIT_ASSERT_EQUAL(7737, f.audioProperties()->lengthInMilliseconds()); CPPUNIT_ASSERT_EQUAL(36, f.audioProperties()->bitrate()); diff --git a/tests/test_speex.cpp b/tests/test_speex.cpp index 7c0f9dc7..1f5bb754 100644 --- a/tests/test_speex.cpp +++ b/tests/test_speex.cpp @@ -44,7 +44,6 @@ public: { Ogg::Speex::File f(TEST_FILE_PATH_C("empty.spx")); CPPUNIT_ASSERT(f.audioProperties()); - CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->length()); CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->lengthInSeconds()); CPPUNIT_ASSERT_EQUAL(3685, f.audioProperties()->lengthInMilliseconds()); CPPUNIT_ASSERT_EQUAL(53, f.audioProperties()->bitrate()); diff --git a/tests/test_string.cpp b/tests/test_string.cpp index 6f00b62d..7b60b814 100644 --- a/tests/test_string.cpp +++ b/tests/test_string.cpp @@ -75,7 +75,6 @@ public: s.clear(); CPPUNIT_ASSERT(s.isEmpty()); - CPPUNIT_ASSERT(!s.isNull()); // deprecated, but still worth it to check. String unicode("José Carlos", String::UTF8); CPPUNIT_ASSERT(strcmp(unicode.toCString(), "Jos\xe9 Carlos") == 0); diff --git a/tests/test_trueaudio.cpp b/tests/test_trueaudio.cpp index 81393ff3..2a040367 100644 --- a/tests/test_trueaudio.cpp +++ b/tests/test_trueaudio.cpp @@ -50,7 +50,6 @@ public: { TrueAudio::File f(TEST_FILE_PATH_C("empty.tta")); CPPUNIT_ASSERT(f.audioProperties()); - CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->length()); CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->lengthInSeconds()); CPPUNIT_ASSERT_EQUAL(3685, f.audioProperties()->lengthInMilliseconds()); CPPUNIT_ASSERT_EQUAL(173, f.audioProperties()->bitrate()); @@ -65,7 +64,6 @@ public: { TrueAudio::File f(TEST_FILE_PATH_C("tagged.tta")); CPPUNIT_ASSERT(f.audioProperties()); - CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->length()); CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->lengthInSeconds()); CPPUNIT_ASSERT_EQUAL(3685, f.audioProperties()->lengthInMilliseconds()); CPPUNIT_ASSERT_EQUAL(173, f.audioProperties()->bitrate()); diff --git a/tests/test_wav.cpp b/tests/test_wav.cpp index 7520cf00..8e96795f 100644 --- a/tests/test_wav.cpp +++ b/tests/test_wav.cpp @@ -59,14 +59,12 @@ public: { RIFF::WAV::File f(TEST_FILE_PATH_C("empty.wav")); CPPUNIT_ASSERT(f.audioProperties()); - CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->length()); CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->lengthInSeconds()); CPPUNIT_ASSERT_EQUAL(3675, f.audioProperties()->lengthInMilliseconds()); CPPUNIT_ASSERT_EQUAL(32, f.audioProperties()->bitrate()); CPPUNIT_ASSERT_EQUAL(2, f.audioProperties()->channels()); CPPUNIT_ASSERT_EQUAL(1000, f.audioProperties()->sampleRate()); CPPUNIT_ASSERT_EQUAL(16, f.audioProperties()->bitsPerSample()); - CPPUNIT_ASSERT_EQUAL(16, f.audioProperties()->sampleWidth()); CPPUNIT_ASSERT_EQUAL(3675U, f.audioProperties()->sampleFrames()); CPPUNIT_ASSERT_EQUAL(1, f.audioProperties()->format()); } @@ -75,14 +73,12 @@ public: { RIFF::WAV::File f(TEST_FILE_PATH_C("alaw.wav")); CPPUNIT_ASSERT(f.audioProperties()); - CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->length()); CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->lengthInSeconds()); CPPUNIT_ASSERT_EQUAL(3550, f.audioProperties()->lengthInMilliseconds()); CPPUNIT_ASSERT_EQUAL(128, f.audioProperties()->bitrate()); CPPUNIT_ASSERT_EQUAL(2, f.audioProperties()->channels()); CPPUNIT_ASSERT_EQUAL(8000, f.audioProperties()->sampleRate()); CPPUNIT_ASSERT_EQUAL(8, f.audioProperties()->bitsPerSample()); - CPPUNIT_ASSERT_EQUAL(8, f.audioProperties()->sampleWidth()); CPPUNIT_ASSERT_EQUAL(28400U, f.audioProperties()->sampleFrames()); CPPUNIT_ASSERT_EQUAL(6, f.audioProperties()->format()); } @@ -91,14 +87,12 @@ public: { RIFF::WAV::File f(TEST_FILE_PATH_C("float64.wav")); CPPUNIT_ASSERT(f.audioProperties()); - CPPUNIT_ASSERT_EQUAL(0, f.audioProperties()->length()); CPPUNIT_ASSERT_EQUAL(0, f.audioProperties()->lengthInSeconds()); CPPUNIT_ASSERT_EQUAL(97, f.audioProperties()->lengthInMilliseconds()); CPPUNIT_ASSERT_EQUAL(5645, f.audioProperties()->bitrate()); CPPUNIT_ASSERT_EQUAL(2, f.audioProperties()->channels()); CPPUNIT_ASSERT_EQUAL(44100, f.audioProperties()->sampleRate()); CPPUNIT_ASSERT_EQUAL(64, f.audioProperties()->bitsPerSample()); - CPPUNIT_ASSERT_EQUAL(64, f.audioProperties()->sampleWidth()); CPPUNIT_ASSERT_EQUAL(4281U, f.audioProperties()->sampleFrames()); CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->format()); } @@ -277,14 +271,12 @@ public: { RIFF::WAV::File f(TEST_FILE_PATH_C("pcm_with_fact_chunk.wav")); CPPUNIT_ASSERT(f.audioProperties()); - CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->length()); CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->lengthInSeconds()); CPPUNIT_ASSERT_EQUAL(3675, f.audioProperties()->lengthInMilliseconds()); CPPUNIT_ASSERT_EQUAL(32, f.audioProperties()->bitrate()); CPPUNIT_ASSERT_EQUAL(2, f.audioProperties()->channels()); CPPUNIT_ASSERT_EQUAL(1000, f.audioProperties()->sampleRate()); CPPUNIT_ASSERT_EQUAL(16, f.audioProperties()->bitsPerSample()); - CPPUNIT_ASSERT_EQUAL(16, f.audioProperties()->sampleWidth()); CPPUNIT_ASSERT_EQUAL(3675U, f.audioProperties()->sampleFrames()); CPPUNIT_ASSERT_EQUAL(1, f.audioProperties()->format()); } diff --git a/tests/test_wavpack.cpp b/tests/test_wavpack.cpp index 65a27c76..6c64f08d 100644 --- a/tests/test_wavpack.cpp +++ b/tests/test_wavpack.cpp @@ -53,7 +53,6 @@ public: { WavPack::File f(TEST_FILE_PATH_C("no_length.wv")); CPPUNIT_ASSERT(f.audioProperties()); - CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->length()); CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->lengthInSeconds()); CPPUNIT_ASSERT_EQUAL(3705, f.audioProperties()->lengthInMilliseconds()); CPPUNIT_ASSERT_EQUAL(1, f.audioProperties()->bitrate()); @@ -69,7 +68,6 @@ public: { WavPack::File f(TEST_FILE_PATH_C("four_channels.wv")); CPPUNIT_ASSERT(f.audioProperties()); - CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->length()); CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->lengthInSeconds()); CPPUNIT_ASSERT_EQUAL(3833, f.audioProperties()->lengthInMilliseconds()); CPPUNIT_ASSERT_EQUAL(112, f.audioProperties()->bitrate()); @@ -85,7 +83,6 @@ public: { WavPack::File f(TEST_FILE_PATH_C("tagged.wv")); CPPUNIT_ASSERT(f.audioProperties()); - CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->length()); CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->lengthInSeconds()); CPPUNIT_ASSERT_EQUAL(3550, f.audioProperties()->lengthInMilliseconds()); CPPUNIT_ASSERT_EQUAL(172, f.audioProperties()->bitrate()); |