TestTrack.h   TestTrack.h 
/************************************************************************** /*
* This software is in the public domain, furnished "as is", without techni
* Copyright 2005-2009 Last.fm Ltd. cal
* support, and with no warranty, express or implied, as to its usefulness
* for
* any purpose.
* This program is free software; you can redistribute it and/or modify */
*
* it under the terms of the GNU General Public License as published by #ifndef LASTFM_TESTTRACK_H
* #define LASTFM_TESTTRACK_H
* the Free Software Foundation; either version 2 of the License, or
* #include "Track.h"
* (at your option) any later version.
*
*
*
* This program is distributed in the hope that it will be useful,
*
* but WITHOUT ANY WARRANTY; without even the implied warranty of
*
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
*
* GNU General Public License for more details.
*
*
*
* You should have received a copy of the GNU General Public License
*
* along with this program; if not, write to the
*
* Free Software Foundation, Inc.,
*
* 51 Franklin Steet, Fifth Floor, Boston, MA 02110-1301, USA.
*
**************************************************************************
*/
#include <QtTest> #include <QtTest>
#include <lastfm/Track>
using lastfm::Track; using lastfm::Track;
class TestTrack : public QObject class TestTrack : public QObject
{ {
Q_OBJECT Q_OBJECT
Track example() Track example()
{ {
lastfm::MutableTrack t; lastfm::MutableTrack t;
t.setTitle( "Test Title" ); t.setTitle( "Test Title" );
t.setArtist( "Test Artist" ); t.setArtist( "Test Artist" );
t.setAlbum( "Test Album" ); t.setAlbum( "Test Album" );
return t; return t;
} }
private slots: private slots:
void testClone() void testClone()
{ {
Track original = example(); Track original = example();
Track copy = original.clone(); Track copy = original;
#define TEST( x ) QVERIFY( original.x == copy.x ) #define TEST( x ) QVERIFY( original.x == copy.x )
TEST( title() ); TEST( title() );
TEST( artist() ); TEST( artist() );
TEST( album() ); TEST( album() );
#undef TEST #undef TEST
} }
}; };
#endif
 End of changes. 4 change blocks. 
38 lines changed or deleted 13 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/