From 0f3d9b1d84354ed19e2522869b1164f135ed8a51 Mon Sep 17 00:00:00 2001 From: Robin Burchell Date: Tue, 28 Feb 2012 20:49:25 +0100 Subject: Add test data for string forms of numbers. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Similar to the UUID benchmark, but won't have any non-numerical characters. Change-Id: I7487c97cab96fd53c180fe12061e7be3ca96e883 Reviewed-by: João Abecasis --- tests/benchmarks/corelib/tools/qhash/main.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tests/benchmarks/corelib/tools') diff --git a/tests/benchmarks/corelib/tools/qhash/main.cpp b/tests/benchmarks/corelib/tools/qhash/main.cpp index db33200d43..f7c0f66df3 100644 --- a/tests/benchmarks/corelib/tools/qhash/main.cpp +++ b/tests/benchmarks/corelib/tools/qhash/main.cpp @@ -135,6 +135,18 @@ void tst_QHash::data() QTest::newRow("dictionary") << dict; } + { + // string versions of numbers. + static QStringList numbers; + + if (numbers.isEmpty()) { + for (int i = 5000000; i < 5005001; ++i) + numbers.append(QString::number(i)); + } + + QTest::newRow("numbers") << numbers; + } + } void tst_QHash::qhash_qt4() -- cgit v1.2.3