tst_qsslsocket: improve failure message

Cast enum to int so that we get the actual and expected values in the
failure message, rather than merely "Compared values are not the same".

Change-Id: Idc20e050c2e8a07d70f839c0a45044b070c0900e
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
This commit is contained in:
Rohan McGovern 2011-11-18 14:16:27 +10:00 committed by Qt by Nokia
parent 25ff7e41dd
commit 1825c9aefc

View File

@ -1038,7 +1038,7 @@ void tst_QSslSocket::protocolServerSide()
QFETCH(bool, works);
QAbstractSocket::SocketState expectedState = (works) ? QAbstractSocket::ConnectedState : QAbstractSocket::UnconnectedState;
QCOMPARE(client->state(), expectedState);
QCOMPARE(int(client->state()), int(expectedState));
QCOMPARE(client->isEncrypted(), works);
}