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