diff options
author | Magne Pettersen Zachrisen <magne.zachrisen@tandberg.com> | 2010-08-10 19:52:06 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2010-08-11 14:22:09 (GMT) |
commit | 56396b4b2b66da3133aff1b3864c550ce892d233 (patch) | |
tree | d783766e74ef9914e60a350921745ceef63069b5 /src/testlib/qtestlogger_p.h | |
parent | ef0d191e3d138f695a39128b6040d0884821f5b5 (diff) | |
download | Qt-56396b4b2b66da3133aff1b3864c550ce892d233.zip Qt-56396b4b2b66da3133aff1b3864c550ce892d233.tar.gz Qt-56396b4b2b66da3133aff1b3864c550ce892d233.tar.bz2 |
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/qtestlogger_p.h')
-rw-r--r-- | src/testlib/qtestlogger_p.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/testlib/qtestlogger_p.h b/src/testlib/qtestlogger_p.h index bb7a358..8932a85 100644 --- a/src/testlib/qtestlogger_p.h +++ b/src/testlib/qtestlogger_p.h @@ -101,6 +101,9 @@ class QTestLogger : public QAbstractTestLogger int qwarnCount() const; int qfatalCount() const; int infoCount() const; + void registerRandomSeed(unsigned int seed); + unsigned int randomSeed() const; + bool hasRandomSeed() const; private: QTestElement *listOfTestcases; @@ -121,6 +124,8 @@ class QTestLogger : public QAbstractTestLogger int qwarnCounter; int qfatalCounter; int infoCounter; + unsigned int randomSeed_; + bool hasRandomSeed_; }; QT_END_NAMESPACE |