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

List:       kde-commits
Subject:    KDE/kdemultimedia/libkcddb/test
From:       Richard Lärkäng <richard () goteborg ! utfors ! se>
Date:       2007-07-15 15:42:00
Message-ID: 1184514120.474364.23933.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 688256 by larkang:

Verify that result == Sucess in tests


 M  +3 -0      asynccddblookuptest.cpp  
 M  +2 -0      asynccddblookuptest.h  
 M  +3 -0      asynchttplookuptest.cpp  
 M  +2 -0      asynchttplookuptest.h  
 M  +3 -0      asyncmusicbrainztest.cpp  
 M  +2 -0      asyncmusicbrainztest.h  
 M  +2 -0      musicbrainztest.cpp  
 M  +3 -1      synccddblookuptest.cpp  
 M  +3 -1      synchttplookuptest.cpp  


--- trunk/KDE/kdemultimedia/libkcddb/test/asynccddblookuptest.cpp #688255:688256
@@ -57,6 +57,8 @@
 
   delete client_;
 
+  QVERIFY(m_result == Success);
+
   // If revision doesn't match, test probably needs to be updated
   // See: http://www.freedb.org/freedb/jazz/a1107d0a for updated data
   QCOMPARE(m_info.get("revision").toInt(), 4);
@@ -90,6 +92,7 @@
   void
 AsyncCDDBLookupTest::slotFinished(Result r)
 {
+  m_result = r;
   kDebug() << "AsyncCDDBLookupTest::slotResult: Got " << KCDDB::resultToString(r) << endl;
 
   CDInfoList l = client_->lookupResponse();
--- trunk/KDE/kdemultimedia/libkcddb/test/asynccddblookuptest.h #688255:688256
@@ -23,6 +23,7 @@
 #include <QEventLoop>
 #include <QObject>
 #include <libkcddb/client.h>
+#include <libkcddb/kcddb.h>
 
 using namespace KCDDB;
 
@@ -38,6 +39,7 @@
     QEventLoop m_eventLoop;
     KCDDB::Client * client_;
     CDInfo m_info;
+    Result m_result;
 };
 
 #endif
--- trunk/KDE/kdemultimedia/libkcddb/test/asynchttplookuptest.cpp #688255:688256
@@ -58,6 +58,8 @@
 
   delete client_;
 
+  QVERIFY(m_result == Success);
+
   // If revision doesn't match, test probably needs to be updated
   // See: http://www.freedb.org/freedb/jazz/a1107d0a for updated data
   QCOMPARE(m_info.get("revision").toInt(), 4);
@@ -91,6 +93,7 @@
   void
 AsyncHTTPLookupTest::slotFinished(Result r)
 {
+  m_result = r;
   kDebug() << "AsyncHTTPLookupTest::slotFinished: Got " << KCDDB::resultToString(r) << endl;
 
   CDInfoList l = client_->lookupResponse();
--- trunk/KDE/kdemultimedia/libkcddb/test/asynchttplookuptest.h #688255:688256
@@ -23,6 +23,7 @@
 #include <QEventLoop>
 #include <QObject>
 #include <libkcddb/client.h>
+#include <libkcddb/kcddb.h>
 
 using namespace KCDDB;
 
@@ -38,6 +39,7 @@
     QEventLoop m_eventLoop;
     KCDDB::Client * client_;
     CDInfo m_info;
+    Result m_result;
 };
 
 #endif
--- trunk/KDE/kdemultimedia/libkcddb/test/asyncmusicbrainztest.cpp #688255:688256
@@ -61,6 +61,8 @@
 
   m_eventLoop.exec(QEventLoop::ExcludeUserInputEvents);
 
+  QVERIFY(m_result == Success);
+
   // See http://musicbrainz.org/release/dbb3e39a-4bea-4e32-a546-456654f30ca6.html for changes
   QCOMPARE(m_info.numberOfTracks(),17);
 
@@ -134,6 +136,7 @@
   void
 AsyncMusicBrainzTest::slotFinished(Result r)
 {
+  m_result = r;
   kDebug() << k_funcinfo << ": Got " << KCDDB::resultToString(r) << endl;
 
   CDInfoList l = client_->lookupResponse();
--- trunk/KDE/kdemultimedia/libkcddb/test/asyncmusicbrainztest.h #688255:688256
@@ -23,6 +23,7 @@
 #include <QEventLoop>
 #include <QObject>
 #include <libkcddb/client.h>
+#include <libkcddb/kcddb.h>
 
 using namespace KCDDB;
 
@@ -38,6 +39,7 @@
     QEventLoop m_eventLoop;
     KCDDB::Client * client_;
     CDInfo m_info;
+    Result m_result;
 };
 
 #endif
--- trunk/KDE/kdemultimedia/libkcddb/test/musicbrainztest.cpp #688255:688256
@@ -54,6 +54,8 @@
 
   Result r = c.lookup(list);
 
+  QVERIFY(r == Success);
+
   kDebug() << "Client::lookup gave : " << resultToString(r) << endl;
 
   CDInfoList response = c.lookupResponse();
--- trunk/KDE/kdemultimedia/libkcddb/test/synccddblookuptest.cpp #688255:688256
@@ -43,8 +43,10 @@
     << 176085
     << 234500;
 
-  c.lookup(list);
+  Result r = c.lookup(list);
 
+  QVERIFY(r == Success);
+
   CDInfoList response = c.lookupResponse();
 
   CDInfoList::ConstIterator it;
--- trunk/KDE/kdemultimedia/libkcddb/test/synchttplookuptest.cpp #688255:688256
@@ -43,8 +43,10 @@
     << 176085
     << 234500;
 
-  c.lookup(list);
+  Result r = c.lookup(list);
 
+  QVERIFY(r == Success);
+
   CDInfoList response = c.lookupResponse();
 
   CDInfoList::ConstIterator it;
[prev in list] [next in list] [prev in thread] [next in thread] 

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