mirror of
https://github.com/clementine-player/Clementine
synced 2025-01-31 11:35:24 +01:00
Fix tests when build some options are disabled
This commit is contained in:
parent
b271c714b8
commit
7086d7bf03
@ -99,7 +99,7 @@ endmacro (add_test_file)
|
||||
|
||||
|
||||
#add_test_file(albumcoverfetcher_test.cpp false)
|
||||
add_test_file(albumcovermanager_test.cpp true)
|
||||
|
||||
add_test_file(asxparser_test.cpp false)
|
||||
add_test_file(asxiniparser_test.cpp false)
|
||||
add_test_file(cueparser_test.cpp false)
|
||||
@ -120,10 +120,14 @@ add_test_file(song_test.cpp false)
|
||||
add_test_file(translations_test.cpp false)
|
||||
add_test_file(xspfparser_test.cpp false)
|
||||
|
||||
if (HAVE_SCRIPTING_PYTHON)
|
||||
if(HAVE_LIBLASTFM)
|
||||
add_test_file(albumcovermanager_test.cpp true)
|
||||
endif(HAVE_LIBLASTFM)
|
||||
|
||||
if(LINUX AND HAVE_DBUS)
|
||||
add_test_file(mpris1_test.cpp true)
|
||||
endif(LINUX AND HAVE_DBUS)
|
||||
|
||||
if(HAVE_SCRIPTING_PYTHON)
|
||||
add_test_file(python_test.cpp true)
|
||||
endif (HAVE_SCRIPTING_PYTHON)
|
||||
|
||||
if(LINUX)
|
||||
add_test_file(mpris1_test.cpp true)
|
||||
endif(LINUX)
|
||||
|
@ -15,6 +15,7 @@
|
||||
along with Clementine. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "core/encoding.h"
|
||||
#include "core/song.h"
|
||||
#include "radio/fixlastfm.h"
|
||||
@ -44,6 +45,7 @@ class SongTest : public ::testing::Test {
|
||||
};
|
||||
|
||||
|
||||
#ifdef HAVE_LIBLASTFM
|
||||
TEST_F(SongTest, InitsFromLastFM) {
|
||||
Song song;
|
||||
lastfm::MutableTrack track;
|
||||
@ -58,6 +60,7 @@ TEST_F(SongTest, InitsFromLastFM) {
|
||||
EXPECT_EQ("Baz", song.album());
|
||||
EXPECT_EQ("Bar", song.artist());
|
||||
}
|
||||
#endif // HAVE_LIBLASTFM
|
||||
|
||||
TEST_F(SongTest, InitsFromFile) {
|
||||
QTemporaryFile temp;
|
||||
|
Loading…
x
Reference in New Issue
Block a user