summaryrefslogtreecommitdiffstats
path: root/src/testlib/qtestlog_p.h
diff options
context:
space:
mode:
authorJason McDonald <jason.mcdonald@nokia.com>2011-08-29 16:50:52 +1000
committerQt by Nokia <qt-info@nokia.com>2011-08-31 03:44:17 +0200
commit527317748d00739994e3865b8f4e2525fc3ca2c7 (patch)
tree1cf509b1f0ea6bac9b878e6d079d49143813aa2c /src/testlib/qtestlog_p.h
parent9be3851eb948a2e7a52273b222334e29d82fa437 (diff)
Remove ability to run tests in random order.
Remove the undocumented feature that allows test functions to be executed in random order. The feature was designed to expose unintended dependencies between test functions -- test functions are only supposed to depend on the initTestCase() and init() functions. Aside from the lack of documentation, there are a number of problems with this feature. Most importantly, running the tests in random order has only a 50% chance of exposing dependencies between test functions. A better strategy would be to run the test functions in reverse order and complain if that produces different results to running the tests in the normal order. Additionally, the random order is not deterministic, so even if a dependency is exposed during a test run, there's no guarantee that it will be exposed again. The feature allows the user to optionally supply a random seed to make the "random" order deterministic, but as rand() implementations are not identical across platforms, even that does not guarantee that dependencies between test functions will be exposed deterministically. Change-Id: I39eac34c532ccb988116778bbc5ab05d835874c5 Reviewed-on: http://codereview.qt.nokia.com/3720 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Diffstat (limited to 'src/testlib/qtestlog_p.h')
-rw-r--r--src/testlib/qtestlog_p.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/testlib/qtestlog_p.h b/src/testlib/qtestlog_p.h
index 006b3ac12f..9b580eb8cc 100644
--- a/src/testlib/qtestlog_p.h
+++ b/src/testlib/qtestlog_p.h
@@ -82,7 +82,6 @@ public:
static void info(const char *msg, const char *file, int line);
static void startLogging();
- static void startLogging(unsigned int randomSeed);
static void stopLogging();
static void setLogMode(LogMode mode);