summaryrefslogtreecommitdiffstats
path: root/tests/benchmarks/corelib/plugin/quuid
diff options
context:
space:
mode:
Diffstat (limited to 'tests/benchmarks/corelib/plugin/quuid')
-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;