summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Holthuis <jholthuis@mixxx.org>2022-01-06 11:18:21 +0100
committerJan Holthuis <jholthuis@mixxx.org>2022-01-06 11:18:21 +0100
commit17a4b16970333dcdd337225295054ce0b80355fa (patch)
treeb6614336686eecb5ae7ec012a57ff80daeb10bb5
parentc376317a43463d11bdce6c7c1f646e78fa7bcaf4 (diff)
Revert "test: Disable broken check in SoundProxyTest.getTypeFromFile"
This reverts commit 66900632bf2d89073ba3fb74e3c278aa6e51df33 because the underlying issue (i.e. SoundSource::getTypeFromFile() not detecting the correct file type if the file has a known but misleading file extension) has been fixed in commit c376317a43463d11bdce6c7c1f646e78fa7bcaf4. Hence, the check can be re-enabled.
-rw-r--r--src/test/soundproxy_test.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/test/soundproxy_test.cpp b/src/test/soundproxy_test.cpp
index 0da9c8ade3..fe75fec0e8 100644
--- a/src/test/soundproxy_test.cpp
+++ b/src/test/soundproxy_test.cpp
@@ -740,11 +740,8 @@ TEST_F(SoundSourceProxyTest, getTypeFromFile) {
tempDir.filePath("file_with_empty_suffix.");
const QString filePathWithUnknownSuffix =
tempDir.filePath("file_with.unknown_suffix");
- // TODO: Currently, our SoundSource::getTypeFromFile() can not detect the
- // file type of files with a known but wrong file extension properly, so
- // this test needs to be disabled.
- //const QString filePathWithWrongSuffix =
- // tempDir.filePath("file_with_wrong_suffix.wav");
+ const QString filePathWithWrongSuffix =
+ tempDir.filePath("file_with_wrong_suffix.wav");
const QString filePathWithUppercaseAndLeadingTrailingWhitespaceSuffix =
tempDir.filePath("file_with_uppercase_suffix. MP3 ");
@@ -753,7 +750,7 @@ TEST_F(SoundSourceProxyTest, getTypeFromFile) {
mixxxtest::copyFile(validFilePath, filePathWithoutSuffix);
mixxxtest::copyFile(validFilePath, filePathWithEmptySuffix);
mixxxtest::copyFile(validFilePath, filePathWithUnknownSuffix);
- //mixxxtest::copyFile(validFilePath, filePathWithWrongSuffix);
+ mixxxtest::copyFile(validFilePath, filePathWithWrongSuffix);
mixxxtest::copyFile(validFilePath, filePathWithUppercaseAndLeadingTrailingWhitespaceSuffix);
ASSERT_STREQ(qPrintable("mp3"),
@@ -769,9 +766,9 @@ TEST_F(SoundSourceProxyTest, getTypeFromFile) {
EXPECT_STREQ(qPrintable("mp3"),
qPrintable(mixxx::SoundSource::getTypeFromFile(
QFileInfo(filePathWithUnknownSuffix))));
- //EXPECT_STREQ(qPrintable("mp3"),
- // qPrintable(mixxx::SoundSource::getTypeFromFile(
- // QFileInfo(filePathWithWrongSuffix))));
+ EXPECT_STREQ(qPrintable("mp3"),
+ qPrintable(mixxx::SoundSource::getTypeFromFile(
+ QFileInfo(filePathWithWrongSuffix))));
EXPECT_STREQ(qPrintable("mp3"),
qPrintable(mixxx::SoundSource::getTypeFromFile(
QFileInfo(filePathWithUppercaseAndLeadingTrailingWhitespaceSuffix))));