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

de_de breaks the determinism tests #211

Closed
xoryouyou opened this issue Dec 27, 2024 · 2 comments
Closed

de_de breaks the determinism tests #211

xoryouyou opened this issue Dec 27, 2024 · 2 comments

Comments

@xoryouyou
Copy link
Contributor

First of all sorry for the inconvenience.

The determinism tests fail, due to the newly introduced ADDRESS_CITY_GEN_FN which uses a separate rand::thread_rng().
The test originally seeds the rng and provides fake with two identical instances here

tests/determinism.rs#L10

I have no idea on top of my hat, but the footpring of ADDRESS_CITY_GEN_FN needs to be changed from Option<fn()->String> to somehow include the original thread_rng().

@cksac
Copy link
Owner

cksac commented Dec 27, 2024

it is ok, I have introduced CityNameGenFn,

pub trait CityNameGenFn: Data + Sized + Copy {

the current test fail is fixed

@xoryouyou
Copy link
Contributor Author

Ohh I have just pulled master and seen your changes.
Awesome then nevermind the issue, I'll close it.

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

No branches or pull requests

2 participants