summaryrefslogtreecommitdiffstats
path: root/src/test
diff options
context:
space:
mode:
authorUwe Klotz <uwe_klotz@web.de>2017-11-26 13:34:29 +0100
committerUwe Klotz <uwe_klotz@web.de>2017-11-29 21:38:21 +0100
commitef3d25d3e4ebd80254854665f7a787b7cf80caba (patch)
treef5ecaef13eea25b49aded9c90037f18de5106012 /src/test
parentabaf7eaa6550b41c2c432f65fb611d79ea8406cd (diff)
Try to fix tag writing tests on AppVeyor
Diffstat (limited to 'src/test')
-rw-r--r--src/test/searchqueryparsertest.cpp1
-rw-r--r--src/test/taglibtest.cpp14
-rw-r--r--src/test/trackexport_test.cpp1
3 files changed, 9 insertions, 7 deletions
diff --git a/src/test/searchqueryparsertest.cpp b/src/test/searchqueryparsertest.cpp
index 392974a6bb..4844901cda 100644
--- a/src/test/searchqueryparsertest.cpp
+++ b/src/test/searchqueryparsertest.cpp
@@ -1,7 +1,6 @@
#include <gtest/gtest.h>
#include <QtDebug>
#include <QDir>
-#include <QTemporaryFile>
#include "test/librarytest.h"
diff --git a/src/test/taglibtest.cpp b/src/test/taglibtest.cpp
index 3d63522ef8..cdee2fe1ed 100644
--- a/src/test/taglibtest.cpp
+++ b/src/test/taglibtest.cpp
@@ -29,8 +29,8 @@ QString generateTemporaryFileName(const QString& fileNameTemplate) {
QTemporaryFile tmpFile(fileNameTemplate);
tmpFile.open();
DEBUG_ASSERT(tmpFile.exists());
- const QString tmpFileName(tmpFile.fileName());
- FileRemover tmpFileRemover(tmpFileName);
+ const QString tmpFileName = tmpFile.fileName();
+ DEBUG_ASSERT(tmpFile.remove());
return tmpFileName;
}
@@ -40,8 +40,8 @@ void copyFile(const QString& srcFileName, const QString& dstFileName) {
qDebug() << "Copying file"
<< srcFileName
<< "->"
- <<dstFileName;
- srcFile.copy(dstFileName);
+ << dstFileName;
+ DEBUG_ASSERT(srcFile.copy(dstFileName));
QFile dstFile(dstFileName);
DEBUG_ASSERT(dstFile.exists());
DEBUG_ASSERT(srcFile.size() == dstFile.size());
@@ -51,7 +51,7 @@ TEST_F(TagLibTest, WriteID3v2Tag) {
// Generate a file name for the temporary file
const QString tmpFileName = generateTemporaryFileName("no_id3v1_mp3");
- // Create the temporary file by copying an exiting file
+ // Create the temporary file by copying an existing file
copyFile(kTestDir.absoluteFilePath("empty.mp3"), tmpFileName);
// Ensure that the temporary file is removed after the test
@@ -66,6 +66,8 @@ TEST_F(TagLibTest, WriteID3v2Tag) {
EXPECT_FALSE(mixxx::taglib::hasAPETag(mpegFile));
}
+ qDebug() << "Setting track title";
+
// Write metadata -> only an ID3v2 tag should be added
mixxx::TrackMetadata trackMetadata;
trackMetadata.refTrackInfo().setTitle("title");
@@ -84,6 +86,8 @@ TEST_F(TagLibTest, WriteID3v2Tag) {
EXPECT_FALSE(mixxx::taglib::hasAPETag(mpegFile));
}
+ qDebug() << "Updating track title";
+
// Write metadata again -> only the ID3v2 tag should be modified
trackMetadata.refTrackInfo().setTitle("title2");
const auto exported2 =
diff --git a/src/test/trackexport_test.cpp b/src/test/trackexport_test.cpp
index f3b22000e4..7877315fb6 100644
--- a/src/test/trackexport_test.cpp
+++ b/src/test/trackexport_test.cpp
@@ -5,7 +5,6 @@
#include <QDebug>
#include <QScopedPointer>
-#include <QTemporaryFile>
FakeOverwriteAnswerer::~FakeOverwriteAnswerer() { }