Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[tests] fix MTPResponder_test::testSetObjectReferences()

On devices with many stored files, 1000 might be a too low object handle
to be invalid.
  • Loading branch information...
commit ccaadada3371deddb6ce1f2c22135d16de67278f 1 parent 0c31ad0
@xhaakon xhaakon authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 mts/protocol/unittests/mtpresponder_test.cpp
6 mts/protocol/unittests/mtpresponder_test.cpp
@@ -35,7 +35,7 @@
#include "mtptransporterdummy.h"
#include "mtptxcontainer.h"
#include "mtprxcontainer.h"
-#include <QVariant>
+#include <limits>
using namespace meegomtp1dot0;
@@ -664,8 +664,8 @@ void MTPResponder_test::testSetObjectReferences()
MTPTxContainer *reqContainer = new MTPTxContainer(MTP_CONTAINER_TYPE_COMMAND, MTP_OP_SetObjectReferences, nextTransactionId(), sizeof(quint32));
*reqContainer << (quint32)m_objectHandle;
- QVector<quint32> theRefs;
- theRefs.append(1000);
+ QVector<ObjHandle> theRefs;
+ theRefs.append(std::numeric_limits<ObjHandle>::max());
quint32 payloadLength = theRefs.size() * sizeof(quint32) + sizeof(quint32);
MTPTxContainer *dataContainer = new MTPTxContainer(MTP_CONTAINER_TYPE_DATA, MTP_OP_SetObjectReferences, m_transactionId, payloadLength);
*dataContainer << theRefs;
Please sign in to comment.
Something went wrong with that request. Please try again.