diff options
Diffstat (limited to 'tests/auto/corelib/tools/qregexp/tst_qregexp.cpp')
-rw-r--r-- | tests/auto/corelib/tools/qregexp/tst_qregexp.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/auto/corelib/tools/qregexp/tst_qregexp.cpp b/tests/auto/corelib/tools/qregexp/tst_qregexp.cpp index fefdec7496..b9a3fc13c5 100644 --- a/tests/auto/corelib/tools/qregexp/tst_qregexp.cpp +++ b/tests/auto/corelib/tools/qregexp/tst_qregexp.cpp @@ -1224,6 +1224,9 @@ void tst_QRegExp::operator_eq() for (int j = 0; j < I * J * K * ELL; ++j) { QCOMPARE(rxtable[i] == rxtable[j], i / ELL == j / ELL); QCOMPARE(rxtable[i] != rxtable[j], i / ELL != j / ELL); + // this just happens to have no hash collisions. If at some point + // we get collisions, restrict the test to only equal elements: + QCOMPARE(qHash(rxtable[i]) == qHash(rxtable[j]), i / ELL == j / ELL); } } } |