diff options
author | Rhys Weatherley <rhys.weatherley@nokia.com> | 2010-02-01 02:17:47 (GMT) |
---|---|---|
committer | Rhys Weatherley <rhys.weatherley@nokia.com> | 2010-02-01 02:17:47 (GMT) |
commit | 3733ee3ca9fdc964f2453089ca18c9179839846e (patch) | |
tree | 95cb7a51eb51f612611f48b44a51c23bcd0f8727 /tests/auto/selftests/tst_selftests.cpp | |
parent | a16a6e6fb3cf9d9c70515d2361bc06c598c27f3f (diff) | |
parent | 8a2f4988afa8af09e4e8ed39d76c8eac0ba30390 (diff) | |
download | Qt-3733ee3ca9fdc964f2453089ca18c9179839846e.zip Qt-3733ee3ca9fdc964f2453089ca18c9179839846e.tar.gz Qt-3733ee3ca9fdc964f2453089ca18c9179839846e.tar.bz2 |
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/oslo-staging-2
Diffstat (limited to 'tests/auto/selftests/tst_selftests.cpp')
-rw-r--r-- | tests/auto/selftests/tst_selftests.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
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; } |