summaryrefslogtreecommitdiffstats
path: root/tests/benchmarks/corelib
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@nokia.com>2011-05-20 11:36:01 +0200
committerQt Continuous Integration System <qt-info@nokia.com>2011-05-27 13:21:42 +0200
commit8f4c007f85a4c16728281cb36f2f0f85b56c0999 (patch)
treef8bf7122d92a9b6f93a8fc7057beadb0f44d053a /tests/benchmarks/corelib
parentc8888b518bd733778518e1643682f97bc7b28b64 (diff)
Add QUuid::toByteArray() and relevant
Add QUuid::toByteArray() and QUuid(const QByteArray &). Same behavior with QUuid::toString() and QUuid(const QString &). Task-number: QTBUG-19419 Reviewed-by: joao (cherry picked from commit 71f923f29e2c60444a85fc765fc582e06cb7eca4) Change-Id: I41dad65e269f739ba9ec1c27e9da96af6401356c Reviewed-on: http://codereview.qt.nokia.com/167 Reviewed-by: Liang Qi <liang.qi@nokia.com>
Diffstat (limited to 'tests/benchmarks/corelib')
-rw-r--r--tests/benchmarks/corelib/plugin/quuid/tst_quuid.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/benchmarks/corelib/plugin/quuid/tst_quuid.cpp b/tests/benchmarks/corelib/plugin/quuid/tst_quuid.cpp
index 61876e5816..24754ab370 100644
--- a/tests/benchmarks/corelib/plugin/quuid/tst_quuid.cpp
+++ b/tests/benchmarks/corelib/plugin/quuid/tst_quuid.cpp
@@ -56,6 +56,8 @@ private slots:
void fromChar();
void toString();
void fromString();
+ void toByteArray();
+ void fromByteArray();
void toDataStream();
void fromDataStream();
void isNull();
@@ -93,6 +95,22 @@ void tst_bench_QUuid::fromString()
}
}
+void tst_bench_QUuid::toByteArray()
+{
+ QUuid uuid = QUuid::createUuid();
+ QBENCHMARK {
+ uuid.toByteArray();
+ }
+}
+
+void tst_bench_QUuid::fromByteArray()
+{
+ QByteArray string = "{67C8770B-44F1-410A-AB9A-F9B5446F13EE}";
+ QBENCHMARK {
+ QUuid uuid(string);
+ }
+}
+
void tst_bench_QUuid::toDataStream()
{
QUuid uuid1, uuid2;