You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was trying to get the seed inside the tests, because they are using random number generators themselves. Usually it is not std::rand but std::minstd_rand with some specific distribution. On the other hand, the classes under test also take a seed.
I have seen, that one can grab the current context with getCurrentContext and then access the configuration. But I am not able to compile it due to linkage errors, e.g.
I was trying to get the seed inside the tests, because they are using random number generators themselves. Usually it is not
std::rand
butstd::minstd_rand
with some specific distribution. On the other hand, the classes under test also take a seed.I have seen, that one can grab the current context with
getCurrentContext
and then access the configuration. But I am not able to compile it due to linkage errors, e.g.will lead to
multiple definition of
Catch::signalDefs', mostly because I had to include
catch_runner.hpp` which I think is not intended.Maybe there already is a correct way to capture the seed inside the test, otherwise it would be a nice feature :-)
The text was updated successfully, but these errors were encountered: