Skip to content

Commit

Permalink
[tests] fix MTPResponder_test::testSetObjectReferences()
Browse files Browse the repository at this point in the history
On devices with many stored files, 1000 might be a too low object handle
to be invalid.
  • Loading branch information
xhaakon committed May 19, 2014
1 parent 0c31ad0 commit ccaadad
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mts/protocol/unittests/mtpresponder_test.cpp
Expand Up @@ -35,7 +35,7 @@
#include "mtptransporterdummy.h" #include "mtptransporterdummy.h"
#include "mtptxcontainer.h" #include "mtptxcontainer.h"
#include "mtprxcontainer.h" #include "mtprxcontainer.h"
#include <QVariant> #include <limits>


using namespace meegomtp1dot0; using namespace meegomtp1dot0;


Expand Down Expand Up @@ -664,8 +664,8 @@ void MTPResponder_test::testSetObjectReferences()
MTPTxContainer *reqContainer = new MTPTxContainer(MTP_CONTAINER_TYPE_COMMAND, MTP_OP_SetObjectReferences, nextTransactionId(), sizeof(quint32)); MTPTxContainer *reqContainer = new MTPTxContainer(MTP_CONTAINER_TYPE_COMMAND, MTP_OP_SetObjectReferences, nextTransactionId(), sizeof(quint32));
*reqContainer << (quint32)m_objectHandle; *reqContainer << (quint32)m_objectHandle;
copyAndSendContainer(reqContainer); copyAndSendContainer(reqContainer);
QVector<quint32> theRefs; QVector<ObjHandle> theRefs;
theRefs.append(1000); theRefs.append(std::numeric_limits<ObjHandle>::max());
quint32 payloadLength = theRefs.size() * sizeof(quint32) + sizeof(quint32); quint32 payloadLength = theRefs.size() * sizeof(quint32) + sizeof(quint32);
MTPTxContainer *dataContainer = new MTPTxContainer(MTP_CONTAINER_TYPE_DATA, MTP_OP_SetObjectReferences, m_transactionId, payloadLength); MTPTxContainer *dataContainer = new MTPTxContainer(MTP_CONTAINER_TYPE_DATA, MTP_OP_SetObjectReferences, m_transactionId, payloadLength);
*dataContainer << theRefs; *dataContainer << theRefs;
Expand Down

0 comments on commit ccaadad

Please sign in to comment.