From 977fb2aeb081114c49d3c2def21bd226fbf0b410 Mon Sep 17 00:00:00 2001 From: Tsuda Kageyu Date: Wed, 31 Dec 2014 00:41:22 +0900 Subject: [PATCH] Fix compilation errors on Clang. --- tests/test_aiff.cpp | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/tests/test_aiff.cpp b/tests/test_aiff.cpp index e90f5280..a99b2350 100644 --- a/tests/test_aiff.cpp +++ b/tests/test_aiff.cpp @@ -21,24 +21,16 @@ public: void testReading() { - ScopedFileCopy copy("empty", ".aiff"); - string filename = copy.fileName(); - - RIFF::AIFF::File *f = new RIFF::AIFF::File(filename.c_str()); - CPPUNIT_ASSERT_EQUAL(705, f->audioProperties()->bitrate()); - delete f; + RIFF::AIFF::File f(TEST_FILE_PATH_C("empty.aiff")); + CPPUNIT_ASSERT_EQUAL(705, f.audioProperties()->bitrate()); } void testAiffCProperties() { - ScopedFileCopy copy("alaw", ".aifc"); - string filename = copy.fileName(); - - RIFF::AIFF::File *f = new RIFF::AIFF::File(filename.c_str()); - CPPUNIT_ASSERT(f->audioProperties()->isAiffC()); - CPPUNIT_ASSERT_EQUAL(ByteVector("ALAW"), f->audioProperties()->compressionType()); - CPPUNIT_ASSERT_EQUAL(String("SGI CCITT G.711 A-law"), f->audioProperties()->compressionName()); - delete f; + RIFF::AIFF::File f(TEST_FILE_PATH_C("alaw.aifc")); + CPPUNIT_ASSERT(f.audioProperties()->isAiffC()); + CPPUNIT_ASSERT(f.audioProperties()->compressionType() == "ALAW"); + CPPUNIT_ASSERT(f.audioProperties()->compressionName() == "SGI CCITT G.711 A-law"); } void testFuzzedFiles() -- 2.40.0