diff options
author | Magne Pettersen Zachrisen <magne.zachrisen@tandberg.com> | 2010-08-10 21:52:06 +0200 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2010-08-11 16:22:09 +0200 |
commit | 56396b4b2b66da3133aff1b3864c550ce892d233 (patch) | |
tree | d783766e74ef9914e60a350921745ceef63069b5 /src/testlib/qxmltestlogger_p.h | |
parent | ef0d191e3d138f695a39128b6040d0884821f5b5 (diff) | |
download | qt4-tools-56396b4b2b66da3133aff1b3864c550ce892d233.tar.gz |
Added -random option to tests, making the test cases within a test execute in arbitrary order. Very useful for avoiding test cases being dependent on the running order.
Added -seed option -random to make it possible to reroduce
test results. The seed is printed out when -random is specified
Added selftests for -random and -seed options
Changed int parsing into strtol and QTime->QDateTime as suggested by Mr Macieira, fixed selftests
Merge-request: 2362
Reviewed-by: Thiago Macieira <thiago.macieira@nokia.com>
Diffstat (limited to 'src/testlib/qxmltestlogger_p.h')
-rw-r--r-- | src/testlib/qxmltestlogger_p.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/testlib/qxmltestlogger_p.h b/src/testlib/qxmltestlogger_p.h index ae918dcc54..82dd8a64c4 100644 --- a/src/testlib/qxmltestlogger_p.h +++ b/src/testlib/qxmltestlogger_p.h @@ -79,6 +79,8 @@ 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); @@ -86,6 +88,8 @@ public: private: XmlMode xmlmode; + unsigned int randomSeed; + bool hasRandomSeed; }; QT_END_NAMESPACE |