Debian Codegraph @

tests/TestTrack.h

raw symbols SCIP
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
7 #ifndef LASTFM_TESTTRACK_H
8 #define LASTFM_TESTTRACK_H
9
10 #include "Track.h"
11
12 #include <QtTest>
13
14 using lastfm::Track;
15
16 class TestTrack : public QObject
17 {
18 Q_OBJECT
19
20 Track example()
21 {
22 lastfm::MutableTrack t;
23 t.setTitle( "Test Title" );
24 t.setArtist( "Test Artist" );
25 t.setAlbum( "Test Album" );
26 return t;
27 }
28
29 private Q_SLOTS:
30 void testClone()
31 {
32 Track original = example();
33 Track copy = original;
34
35 #define TEST( x ) QVERIFY( original.x == copy.x )
36 TEST( title() );
37 TEST( artist() );
38 TEST( album() );
39 #undef TEST
40 }
41 };
42
43 #endif