[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [libechonest] tests: Tweak/fix tests
From:       Leo Franchi <lfranchi () kde ! org>
Date:       2013-05-19 2:28:29
Message-ID: 20130519022829.4FA84A6077 () git ! kde ! org
[Download RAW message or body]

Git commit f32ec00185b3fbb4c493dc7cc511b0ad96b7911f by Leo Franchi.
Committed on 19/05/2013 at 04:27.
Pushed by lfranchi into branch 'master'.

Tweak/fix tests

M  +5    -4    tests/SongTest.cpp
M  +1    -0    tests/SongTest.h

http://commits.kde.org/libechonest/f32ec00185b3fbb4c493dc7cc511b0ad96b7911f

diff --git a/tests/SongTest.cpp b/tests/SongTest.cpp
index d2454e8..cd43263 100644
--- a/tests/SongTest.cpp
+++ b/tests/SongTest.cpp
@@ -51,7 +51,7 @@ void SongTest::testSearch1()
         QLatin1String title = QLatin1String( "float on" );
         QCOMPARE( song.title().toLower(), title );
         QCOMPARE( song.artistName().toLower(), QLatin1String( "modest mouse" ) );
-        QCOMPARE( song.artistLocation().location.toLower(), QLatin1String( \
"issaquah, wa, us" ) ); +        QVERIFY( !song.artistLocation().location.isEmpty() \
);  QCOMPARE( song.hotttnesss(), -1. );
         qDebug() << song.hotttnesss() << song.artistHotttnesss() << \
song.artistFamiliarity() << song.artistLocation();  
@@ -64,7 +64,7 @@ void SongTest::testSearch1()
 
         QCOMPARE( song.title().toLower(), title );
         QCOMPARE( song.artistName().toLower(), QLatin1String( "modest mouse" ) );
-        QCOMPARE( song.artistLocation().location.toLower(), QLatin1String( \
"issaquah" ) ); +        QVERIFY( !song.artistLocation().location.isEmpty() );
         // make sure we got the new info
         QVERIFY( song.hotttnesss() != -1 );
 
@@ -92,7 +92,7 @@ void SongTest::testSearch1()
             QVERIFY( !track.foreignId().isEmpty() );
         }
     }
-    QVERIFY( songs.size() == 3 );
+    QVERIFY( songs.size() > 0 );
     QVERIFY( songs[ 1 ].audioSummary().danceability() > 0 );
     QVERIFY( songs[ 1 ].audioSummary().energy() > 0 );
 
@@ -152,7 +152,7 @@ void SongTest::testIdentify()
     QVERIFY( songs.size() > 0 );
     QCOMPARE( songs.first().artistName(), QLatin1String( "Bon Iver" ) );
     QCOMPARE( songs.first().artistId(), QByteArray( "ARKDTAM1187FB54026" ) );
-    QCOMPARE( songs.first().title(), QLatin1String( "01 Flume" ) );
+    QCOMPARE( songs.first().title(), QLatin1String( "Flume" ) );
     QCOMPARE( songs.first().id(), QByteArray( "SOJEVHC12A8C13C3E5" ) );
 }
 
@@ -178,6 +178,7 @@ void SongTest::testIdentifyWithData()
 
 }
 
+
 void SongTest::testSearchSongType()
 {
     Echonest::Song::SearchParams params;
diff --git a/tests/SongTest.h b/tests/SongTest.h
index 18eacf7..e14ebf7 100644
--- a/tests/SongTest.h
+++ b/tests/SongTest.h
@@ -26,6 +26,7 @@ private slots:
     void initTestCase();
 
     void testSearch1();
+    void testSearch2();
     void testProfile();
 
     void testIdentify();


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic