From 900e8b023bccaba6b200b91e2ca5f0d0203e1eed Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Mon, 4 May 2020 18:13:28 +0200 Subject: QChar: make std::hash'able Change-Id: I2164df19cd17ab96a39020de66a3fe9fec838a36 Reviewed-by: Volker Hilsheimer --- tests/auto/corelib/tools/qhashfunctions/tst_qhashfunctions.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tests/auto/corelib/tools/qhashfunctions/tst_qhashfunctions.cpp') diff --git a/tests/auto/corelib/tools/qhashfunctions/tst_qhashfunctions.cpp b/tests/auto/corelib/tools/qhashfunctions/tst_qhashfunctions.cpp index fcd227f1bf..b2ec6e1c1c 100644 --- a/tests/auto/corelib/tools/qhashfunctions/tst_qhashfunctions.cpp +++ b/tests/auto/corelib/tools/qhashfunctions/tst_qhashfunctions.cpp @@ -309,6 +309,13 @@ void tst_QHashFunctions::stdHash() QCOMPARE(s.size(), 2UL); } + { + std::unordered_set s = {u'H', u'W'}; + QCOMPARE(s.size(), 2UL); + s.insert(u'H'); + QCOMPARE(s.size(), 2UL); + } + } void tst_QHashFunctions::setGlobalQHashSeed() -- cgit v1.2.3