-
Notifications
You must be signed in to change notification settings - Fork 125
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
String tests #179
String tests #179
Conversation
{ | ||
std::default_random_engine rand_generator; | ||
std::uniform_int_distribution<int> randnum(min, max); | ||
std::uniform_int_distribution<int> randlen(minlength, maxlength); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would recommend not to use random numbers for any tests. The problem is that the test will be flaky of the result depends on the values. Instead use a "known" pattern, e.g. increment numbers, or ascii characters.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I'll ticket it and change it to use known patterns in a follow-up to keep the scope of this PR narrowed to string testing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ticketed here #181
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 for not using fuzz values. I'm ok with doing it in a follow up if that's what you want.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
{ | ||
std::default_random_engine rand_generator; | ||
std::uniform_int_distribution<int> randnum(min, max); | ||
std::uniform_int_distribution<int> randlen(minlength, maxlength); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 for not using fuzz values. I'm ok with doing it in a follow up if that's what you want.
Yeah I'll open a follow-up not to add noise to thise one. |
This PR adds: