PageRenderTime 102ms CodeModel.GetById 40ms app.highlight 3ms RepoModel.GetById 58ms app.codeStats 0ms

/thirdparty/liblastfm2/tests/TestTrack.h

http://github.com/tomahawk-player/tomahawk
C++ Header | 35 lines | 26 code | 4 blank | 5 comment | 1 complexity | f96b47be0f52988ac79f0bf187464e44 MD5 | raw file
 1/*
 2   This software is in the public domain, furnished "as is", without technical 
 3   support, and with no warranty, express or implied, as to its usefulness for 
 4   any purpose.
 5*/
 6#include <QtTest>
 7#include <lastfm/Track>
 8using lastfm::Track;
 9
10class TestTrack : public QObject
11{
12    Q_OBJECT
13    
14    Track example()
15    {
16        lastfm::MutableTrack t;
17        t.setTitle( "Test Title" );
18        t.setArtist( "Test Artist" );
19        t.setAlbum( "Test Album" );
20        return t;
21    }
22    
23private slots:
24    void testClone()
25    {
26        Track original = example();
27        Track copy = original;
28        
29        #define TEST( x ) QVERIFY( original.x == copy.x )
30        TEST( title() );
31        TEST( artist() );
32        TEST( album() );
33        #undef TEST
34    }
35};