mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-30 17:20:26 +02:00
Add liblastfm2 and make tomahawk build against it
This commit is contained in:
35
thirdparty/liblastfm2/tests/TestTrack.h
vendored
Normal file
35
thirdparty/liblastfm2/tests/TestTrack.h
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
This software is in the public domain, furnished "as is", without technical
|
||||
support, and with no warranty, express or implied, as to its usefulness for
|
||||
any purpose.
|
||||
*/
|
||||
#include <QtTest>
|
||||
#include <lastfm/Track>
|
||||
using lastfm::Track;
|
||||
|
||||
class TestTrack : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
Track example()
|
||||
{
|
||||
lastfm::MutableTrack t;
|
||||
t.setTitle( "Test Title" );
|
||||
t.setArtist( "Test Artist" );
|
||||
t.setAlbum( "Test Album" );
|
||||
return t;
|
||||
}
|
||||
|
||||
private slots:
|
||||
void testClone()
|
||||
{
|
||||
Track original = example();
|
||||
Track copy = original;
|
||||
|
||||
#define TEST( x ) QVERIFY( original.x == copy.x )
|
||||
TEST( title() );
|
||||
TEST( artist() );
|
||||
TEST( album() );
|
||||
#undef TEST
|
||||
}
|
||||
};
|
Reference in New Issue
Block a user