summaryrefslogtreecommitdiffstats
path: root/tests/auto/selftests/benchlibwalltime/tst_benchlibwalltime.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/selftests/benchlibwalltime/tst_benchlibwalltime.cpp')
-rw-r--r--tests/auto/selftests/benchlibwalltime/tst_benchlibwalltime.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/auto/selftests/benchlibwalltime/tst_benchlibwalltime.cpp b/tests/auto/selftests/benchlibwalltime/tst_benchlibwalltime.cpp
index de655995e..8474144f3 100644
--- a/tests/auto/selftests/benchlibwalltime/tst_benchlibwalltime.cpp
+++ b/tests/auto/selftests/benchlibwalltime/tst_benchlibwalltime.cpp
@@ -50,6 +50,7 @@ class tst_BenchlibWalltime: public QObject
private slots:
void waitForOneThousand();
void waitForFourThousand();
+ void qbenchmark_once();
};
void tst_BenchlibWalltime::waitForOneThousand()
@@ -66,6 +67,16 @@ void tst_BenchlibWalltime::waitForFourThousand()
}
}
+void tst_BenchlibWalltime::qbenchmark_once()
+{
+ int iterations = 0;
+ QBENCHMARK_ONCE {
+ ++iterations;
+ }
+ QCOMPARE(iterations, 1);
+}
+
+
QTEST_MAIN(tst_BenchlibWalltime)
#include "tst_benchlibwalltime.moc"