Adjust autotest to coming QHash changes
QHash and QMultiHash are separate classes in the future, and the iterator is not random access. Change-Id: I7e1a4162ca964001c8da81a2fd7c41ccae27bdb3 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
This commit is contained in:
parent
866174307a
commit
e41d243789
@ -2701,8 +2701,10 @@ void testMapLikeStlIterators()
|
|||||||
QString t;
|
QString t;
|
||||||
fake.insert(k, t);
|
fake.insert(k, t);
|
||||||
|
|
||||||
typename Container::iterator i1 = fake.begin(), i2 = i1 + 1;
|
typename Container::iterator i1 = fake.begin(), i2 = i1;
|
||||||
typename Container::const_iterator c1 = i1, c2 = c1 + 1;
|
++i2;
|
||||||
|
typename Container::const_iterator c1 = i1, c2 = c1;
|
||||||
|
++c2;
|
||||||
|
|
||||||
QVERIFY(i1 == i1);
|
QVERIFY(i1 == i1);
|
||||||
QVERIFY(i1 == c1);
|
QVERIFY(i1 == c1);
|
||||||
@ -2712,8 +2714,6 @@ void testMapLikeStlIterators()
|
|||||||
QVERIFY(i2 == c2);
|
QVERIFY(i2 == c2);
|
||||||
QVERIFY(c2 == i2);
|
QVERIFY(c2 == i2);
|
||||||
QVERIFY(c2 == c2);
|
QVERIFY(c2 == c2);
|
||||||
QVERIFY(1 + i1 == i1 + 1);
|
|
||||||
QVERIFY(1 + c1 == c1 + 1);
|
|
||||||
|
|
||||||
QVERIFY(i1 != i2);
|
QVERIFY(i1 != i2);
|
||||||
QVERIFY(i1 != c2);
|
QVERIFY(i1 != c2);
|
||||||
@ -2924,10 +2924,6 @@ void instantiateMutableIterationContainer()
|
|||||||
it = container.begin();
|
it = container.begin();
|
||||||
it = container.end();
|
it = container.end();
|
||||||
Q_UNUSED(it)
|
Q_UNUSED(it)
|
||||||
|
|
||||||
// QSet lacks count(T).
|
|
||||||
const ValueType value = ValueType();
|
|
||||||
container.count(value);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename ContainerType, typename ValueType>
|
template <typename ContainerType, typename ValueType>
|
||||||
@ -2935,10 +2931,9 @@ void instantiateSequence()
|
|||||||
{
|
{
|
||||||
instantiateMutableIterationContainer<ContainerType, ValueType>();
|
instantiateMutableIterationContainer<ContainerType, ValueType>();
|
||||||
|
|
||||||
// QVector lacks removeAll(T)
|
ValueType value = ValueType();
|
||||||
// ValueType value = ValueType();
|
ContainerType container;
|
||||||
// ContainerType container;
|
container.removeAll(value);
|
||||||
// container.removeAll(value);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename ContainerType, typename ValueType>
|
template <typename ContainerType, typename ValueType>
|
||||||
@ -3011,11 +3006,10 @@ void instantiatePairAssociative()
|
|||||||
constContainer.keys();
|
constContainer.keys();
|
||||||
container.remove(key);
|
container.remove(key);
|
||||||
container.take(key);
|
container.take(key);
|
||||||
container.unite(constContainer);
|
container.insert(constContainer);
|
||||||
container.value(key);
|
container.value(key);
|
||||||
container.value(key, value);
|
container.value(key, value);
|
||||||
container.values();
|
container.values();
|
||||||
container.values(key);
|
|
||||||
container[key];
|
container[key];
|
||||||
const int foo = constContainer[key];
|
const int foo = constContainer[key];
|
||||||
Q_UNUSED(foo);
|
Q_UNUSED(foo);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user