Initialize pseudo-random number generator only once when starting the tests (in propgrid sample).
This commit is contained in:
parent
03dfb1cd10
commit
ab32194e91
@ -334,6 +334,8 @@ bool FormMain::RunTests( bool fullTest, bool interactive )
|
||||
|
||||
pgman->ClearSelection();
|
||||
|
||||
srand((unsigned int)(time(NULL) % UINT_MAX));
|
||||
|
||||
int failures = 0;
|
||||
bool _failed_ = false;
|
||||
wxArrayString errorMessages;
|
||||
@ -1233,8 +1235,6 @@ bool FormMain::RunTests( bool fullTest, bool interactive )
|
||||
|
||||
wxPropertyGridPage* page = pgman->GetPage(0);
|
||||
|
||||
srand(0x1234);
|
||||
|
||||
wxArrayPGProperty arr1;
|
||||
|
||||
arr1 = GetPropertiesInRandomOrder(page);
|
||||
@ -1346,9 +1346,6 @@ bool FormMain::RunTests( bool fullTest, bool interactive )
|
||||
{
|
||||
RT_START_TEST(SetFlagsAsString and GetFlagsAsString)
|
||||
|
||||
unsigned int seed = time(NULL) % UINT_MAX;
|
||||
srand(seed);
|
||||
|
||||
// Select the most error prone page as visible.
|
||||
pgman->SelectPage(1);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user