summaryrefslogtreecommitdiffstats
path: root/src/testlib/qxmltestlogger_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/qxmltestlogger_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/qxmltestlogger_p.h')
-rw-r--r--src/testlib/qxmltestlogger_p.h4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/testlib/qxmltestlogger_p.h b/src/testlib/qxmltestlogger_p.h
index ad510d5ce0..c08f5e469e 100644
--- a/src/testlib/qxmltestlogger_p.h
+++ b/src/testlib/qxmltestlogger_p.h
@@ -79,8 +79,6 @@ public:
void addMessage(MessageTypes type, const char *message,
const char *file = 0, int line = 0);
- void registerRandomSeed(unsigned int seed);
-
static int xmlCdata(QTestCharBuffer *dest, char const* src);
static int xmlQuote(QTestCharBuffer *dest, char const* src);
static int xmlCdata(QTestCharBuffer *dest, char const* src, size_t n);
@@ -88,8 +86,6 @@ public:
private:
XmlMode xmlmode;
- unsigned int randomSeed;
- bool hasRandomSeed;
};
QT_END_NAMESPACE