From 91ae988b5c7ce8d9cf9af2d5f2460e91617dc95e Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 11 Dec 2014 17:38:48 -0800 Subject: Remove unnecessary adding of test rows in the QtDBus type benchmark No need to loop twice to add the "native" entries, since they are added by the helper function anyway. Change-Id: I9caabc6fc4973a90b483840815769b1351947a89 Reviewed-by: Friedemann Kleint --- tests/benchmarks/dbus/qdbustype/main.cpp | 35 ++++++++++++++------------------ 1 file changed, 15 insertions(+), 20 deletions(-) (limited to 'tests/benchmarks/dbus/qdbustype/main.cpp') diff --git a/tests/benchmarks/dbus/qdbustype/main.cpp b/tests/benchmarks/dbus/qdbustype/main.cpp index b37a6930e2..b405df99d5 100644 --- a/tests/benchmarks/dbus/qdbustype/main.cpp +++ b/tests/benchmarks/dbus/qdbustype/main.cpp @@ -57,29 +57,24 @@ void tst_QDBusType::benchmarkSignature_data() QTest::addColumn("data"); QTest::addColumn("useNative"); - for (int loopCount = 0; loopCount < 2; ++loopCount) { - bool useNative = loopCount; - QByteArray prefix = useNative ? "native-" : ""; + benchmarkAddRow("single-invalid", "~"); + benchmarkAddRow("single-invalid-array", "a~"); + benchmarkAddRow("single-invalid-struct", "(.)"); - benchmarkAddRow("single-invalid", "~"); - benchmarkAddRow("single-invalid-array", "a~"); - benchmarkAddRow("single-invalid-struct", "(.)"); + benchmarkAddRow("single-char", "b"); + benchmarkAddRow("single-array", "as"); + benchmarkAddRow("single-simplestruct", "(y)"); + benchmarkAddRow("single-simpledict", "a{sv}"); + benchmarkAddRow("single-complexdict", "a{s(aya{io})}"); - benchmarkAddRow("single-char", "b"); - benchmarkAddRow("single-array", "as"); - benchmarkAddRow("single-simplestruct", "(y)"); - benchmarkAddRow("single-simpledict", "a{sv}"); - benchmarkAddRow("single-complexdict", "a{s(aya{io})}"); + benchmarkAddRow("multiple-char", "ssg"); + benchmarkAddRow("multiple-arrays", "asasay"); - benchmarkAddRow("multiple-char", "ssg"); - benchmarkAddRow("multiple-arrays", "asasay"); - - benchmarkAddRow("struct-missingclose", "(ayyyy"); - benchmarkAddRow("longstruct", "(yyyyyyayasy)"); - benchmarkAddRow("invalid-longstruct", "(yyyyyyayas.y)"); - benchmarkAddRow("complexstruct", "(y(aasay)oga{sv})"); - benchmarkAddRow("multiple-simple-structs", "(y)(y)(y)"); - } + benchmarkAddRow("struct-missingclose", "(ayyyy"); + benchmarkAddRow("longstruct", "(yyyyyyayasy)"); + benchmarkAddRow("invalid-longstruct", "(yyyyyyayas.y)"); + benchmarkAddRow("complexstruct", "(y(aasay)oga{sv})"); + benchmarkAddRow("multiple-simple-structs", "(y)(y)(y)"); } void tst_QDBusType::benchmarkSignature() -- cgit v1.2.3