]> granicus.if.org Git - taglib/commitdiff
More tests for WavPack audio properties
authorLukáš Lalinský <lalinsky@gmail.com>
Sat, 27 Nov 2010 21:12:14 +0000 (21:12 +0000)
committerLukáš Lalinský <lalinsky@gmail.com>
Sat, 27 Nov 2010 21:12:14 +0000 (21:12 +0000)
git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@1201478 283d02a7-25f6-0310-bc7c-ecb5cbfe19da

tests/test_wavpack.cpp

index 7129a604389728b469bec8e6a378ad2d264fcf90..03e60202ee591dcf269b5cfa7c02ccd41e498871 100644 (file)
@@ -12,15 +12,27 @@ using namespace TagLib;
 class TestWavPack : public CppUnit::TestFixture
 {
   CPPUNIT_TEST_SUITE(TestWavPack);
+  CPPUNIT_TEST(testBasic);
   CPPUNIT_TEST(testLengthScan);
   CPPUNIT_TEST_SUITE_END();
 
 public:
 
+  void testBasic()
+  {
+    WavPack::File f("data/no_length.wv");
+    WavPack::Properties *props = f.audioProperties();
+    CPPUNIT_ASSERT_EQUAL(44100, props->sampleRate());
+    CPPUNIT_ASSERT_EQUAL(2, props->channels());
+    CPPUNIT_ASSERT_EQUAL(1, props->bitrate());
+    CPPUNIT_ASSERT_EQUAL(0x407, props->version());
+  }
+
   void testLengthScan()
   {
     WavPack::File f("data/no_length.wv");
-    CPPUNIT_ASSERT_EQUAL(4, f.audioProperties()->length());
+    WavPack::Properties *props = f.audioProperties();
+    CPPUNIT_ASSERT_EQUAL(4, props->length());
   }
 
 };