Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the random seed accessible inside the tests #331

Closed
GoogleCodeExporter opened this issue Jul 28, 2015 · 1 comment
Closed

Make the random seed accessible inside the tests #331

GoogleCodeExporter opened this issue Jul 28, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link
Contributor

It would be gread if you could access the random seed inside the tests.

In this way, one could generate pseudo random numbers out of this seed and then 
test the functions with random inputs.

The problem now is, that when we test something with a random seed like 
"time(NULL)", and we have an error, it is really hard to see, what the actual 
input arguments to the function where.

However, if this is connected to the googletest random seed, one can reproduce 
it exactly like the order of the gtest_shuffle, and has really deterministic 
and repeatable results based on the (random) seed...

Original issue reported on code.google.com by rgg...@gmail.com on 19 Nov 2010 at 9:13

@GoogleCodeExporter
Copy link
Contributor Author

You can access the current random seed now via UnitTest::random_seed().      

Original comment by vladlosev on 19 Nov 2010 at 3:46

  • Changed state: Invalid

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant