summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/selftests/expected_benchlibcallgrind.txt2
-rw-r--r--tests/auto/selftests/tst_selftests.cpp13
2 files changed, 9 insertions, 6 deletions
diff --git a/tests/auto/selftests/expected_benchlibcallgrind.txt b/tests/auto/selftests/expected_benchlibcallgrind.txt
index caf2424..f172711 100644
--- a/tests/auto/selftests/expected_benchlibcallgrind.txt
+++ b/tests/auto/selftests/expected_benchlibcallgrind.txt
@@ -2,7 +2,7 @@
Config: Using QTest library 4.5.0, Qt 4.5.0
PASS : tst_BenchlibCallgrind::initTestCase()
RESULT : tst_BenchlibCallgrind::twoHundredMillionInstructions():
- 200,000,000 instr. loads per iteration (total: 200000000, iterations: 1)
+ 200,000,000 instruction reads per iteration (total: 200000000, iterations: 1)
PASS : tst_BenchlibCallgrind::twoHundredMillionInstructions()
PASS : tst_BenchlibCallgrind::cleanupTestCase()
Totals: 3 passed, 0 failed, 0 skipped
diff --git a/tests/auto/selftests/tst_selftests.cpp b/tests/auto/selftests/tst_selftests.cpp
index 89ece0f..6608439 100644
--- a/tests/auto/selftests/tst_selftests.cpp
+++ b/tests/auto/selftests/tst_selftests.cpp
@@ -97,7 +97,7 @@ inline bool qCompare
if (r1.unit == "msec") {
variance = 0.1;
}
- else if (r1.unit == "instr. loads") {
+ else if (r1.unit == "instruction reads") {
variance = 0.001;
}
else if (r1.unit == "ticks") {
@@ -434,7 +434,7 @@ BenchmarkResult BenchmarkResult::parse(QString const& line, QString* error)
/* This code avoids using a QRegExp because QRegExp might be broken. */
- /* Sample format: 4,000 msec per iteration (total: 4000, iterations: 1) */
+ /* Sample format: 4,000 msec per iteration (total: 4,000, iterations: 1) */
QString sFirstNumber;
while (!remaining.isEmpty() && !remaining.at(0).isSpace()) {
@@ -468,7 +468,7 @@ BenchmarkResult BenchmarkResult::parse(QString const& line, QString* error)
remaining = remaining.mid(sizeof(periterbit)-1);
- /* Remaining: 4000, iterations: 1) */
+ /* Remaining: 4,000, iterations: 1) */
static const char itersbit[] = ", iterations: ";
QString sTotal;
while (!remaining.startsWith(itersbit) && !remaining.isEmpty()) {
@@ -482,9 +482,12 @@ BenchmarkResult BenchmarkResult::parse(QString const& line, QString* error)
remaining = remaining.mid(sizeof(itersbit)-1);
- qint64 total = sTotal.toLongLong(&ok);
+ /* 4,000 -> 4000 */
+ sTotal.remove(',');
+
+ double total = sTotal.toDouble(&ok);
if (!ok) {
- if (error) *error = sTotal + " (total) is not a valid integer";
+ if (error) *error = sTotal + " (total) is not a valid number";
return out;
}