diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2017-04-06 11:53:42 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2017-04-06 12:14:00 +0000 |
commit | f825b99f825d85d6b2d882caf79a57187f25cdc3 (patch) | |
tree | d46afb83a20f64a62622a687da99624bf2c5479d | |
parent | 4128480bd592b0bee0274c46f34dbdd863a36600 (diff) |
Fix undefined behavior in tst_tools
It is not allowed to compare iterators from different containers, and
now that we use std::vector rather than QVector to back the Set class,
this actually hits us with MSVC.
Change-Id: I6b63d5ac341cb68efb87ee2a2f61f11974e621d5
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
-rw-r--r-- | src/lib/corelib/tools/tst_tools.cpp | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/src/lib/corelib/tools/tst_tools.cpp b/src/lib/corelib/tools/tst_tools.cpp index 60bb02b24..ca81aff00 100644 --- a/src/lib/corelib/tools/tst_tools.cpp +++ b/src/lib/corelib/tools/tst_tools.cpp @@ -545,8 +545,6 @@ void TestTools::set_begin() QVERIFY(i == j); QVERIFY(k == ell); - QVERIFY(i == k); - QVERIFY(j == ell); } set1.insert(44); @@ -559,8 +557,6 @@ void TestTools::set_begin() QVERIFY(i == j); QVERIFY(k == ell); - QVERIFY(i != k); - QVERIFY(j != ell); } set2 = set1; @@ -604,8 +600,6 @@ void TestTools::set_end() QVERIFY(i == j); QVERIFY(k == ell); - QVERIFY(i != k); - QVERIFY(j != ell); QVERIFY(set1.constBegin() != set1.constEnd()); QVERIFY(set2.constBegin() == set2.constEnd()); |