summaryrefslogtreecommitdiffstats
path: root/tests/benchmarks/qstringlist/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/benchmarks/qstringlist/main.cpp')
-rw-r--r--tests/benchmarks/qstringlist/main.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/benchmarks/qstringlist/main.cpp b/tests/benchmarks/qstringlist/main.cpp
index 645b4f0..6af41c0 100644
--- a/tests/benchmarks/qstringlist/main.cpp
+++ b/tests/benchmarks/qstringlist/main.cpp
@@ -63,6 +63,9 @@ private slots:
void split_stdw() const;
void split_stdw_data() const { return split_data(); }
+ void split_ba() const;
+ void split_ba_data() const { return split_data(); }
+
private:
static QStringList populateList(const int count, const QString &unit);
static QString populateString(const int count, const QString &unit);
@@ -174,6 +177,17 @@ void tst_QStringList::split_stdw() const
}
}
+void tst_QStringList::split_ba() const
+{
+ QFETCH(QString, input);
+ const char splitChar = ':';
+ QByteArray ba = input.toLatin1();
+
+ QBENCHMARK {
+ ba.split(splitChar);
+ }
+}
+
QTEST_MAIN(tst_QStringList)
#include "main.moc"