summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDario Freddi <dario.freddi@collabora.com>2012-02-23 18:12:38 +0100
committerDario Freddi <dario.freddi@collabora.com>2012-03-13 14:32:22 +0100
commit8113e60499c0357ad51bddc05f5770cdba74a152 (patch)
treed0ab8aba6785b5f48cf78a1754f9d039404e9d2c /tests
parent739c8ecb2d690dbe192af77c875a6d4c458d6b78 (diff)
captcha-authentication: Cast the correct type
Diffstat (limited to 'tests')
-rw-r--r--tests/dbus/captcha-authentication.cpp14
1 files changed, 3 insertions, 11 deletions
diff --git a/tests/dbus/captcha-authentication.cpp b/tests/dbus/captcha-authentication.cpp
index 3fac07e4..67a98414 100644
--- a/tests/dbus/captcha-authentication.cpp
+++ b/tests/dbus/captcha-authentication.cpp
@@ -28,9 +28,6 @@ public:
mConn(0), mChanService(0)
{ }
-protected Q_SLOTS:
- void onStatusChanged(Tp::CaptchaStatus status);
-
private Q_SLOTS:
void initTestCase();
void init();
@@ -53,11 +50,6 @@ private:
CaptchaAuthenticationPtr mCaptcha;
};
-void TestCaptchaAuthentication::onStatusChanged(Tp::CaptchaStatus status)
-{
- mLoop->exit(0);
-}
-
void TestCaptchaAuthentication::createCaptchaChannel(bool canRetry)
{
mChan.reset();
@@ -143,7 +135,7 @@ void TestCaptchaAuthentication::testCaptchaSuccessful()
QCOMPARE(captchaData.label(), QLatin1String("Enter the text displayed"));
QCOMPARE(captchaData.data(), QByteArray("This is a fake payload"));
QCOMPARE(captchaData.type(), CaptchaAuthentication::OCRChallenge);
- QCOMPARE((int)captchaData.id(), 42);
+ QCOMPARE(captchaData.id(), (uint)42);
QVERIFY(connect(mCaptcha->answer(42, QLatin1String("This is the right answer")),
SIGNAL(finished(Tp::PendingOperation *)),
@@ -187,7 +179,7 @@ void TestCaptchaAuthentication::testCaptchaRetry()
QCOMPARE(captchaData.label(), QLatin1String("Enter the text displayed"));
QCOMPARE(captchaData.data(), QByteArray("This is a reloaded payload"));
QCOMPARE(captchaData.type(), CaptchaAuthentication::OCRChallenge);
- QCOMPARE((int)captchaData.id(), 42);
+ QCOMPARE(captchaData.id(), (uint)42);
QVERIFY(connect(mCaptcha->answer(42, QLatin1String("This is the right answer")),
SIGNAL(finished(Tp::PendingOperation *)),
@@ -210,7 +202,7 @@ void TestCaptchaAuthentication::testCaptchaCancel()
SLOT(expectSuccessfulCall(Tp::PendingOperation *))));
// Check that the result is not still available
QCOMPARE(pendingCaptchas->captchaList().size(), 0);
- QCOMPARE((int)pendingCaptchas->captcha().id(), 0);
+ QCOMPARE(pendingCaptchas->captcha().id(), (uint)0);
QCOMPARE(mLoop->exec(), 0);
// Cancel now