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

Fix indeterministic logging tests #447

Closed
wants to merge 3 commits into from

Conversation

xhochy
Copy link

@xhochy xhochy commented Apr 29, 2019

Printing the content of hash-based containers doesn't lead always to the same string as their ordering is not fixed. Luckily the number of possible permutations is so small that we can enumerate all of them.

Fixes #201.

@googlebot
Copy link
Collaborator

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here (e.g. I signed it!) and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

Printing the content of hash-based containers doesn't lead always to the same string as their ordering is not fixed. Luckily the number of possible permutations is so small that we can enumerate all of them.

Fixes google#201.
@xhochy xhochy force-pushed the hash-logging-is-indeterministic branch from 71baeac to 8b5b912 Compare April 29, 2019 15:44
@googlebot
Copy link
Collaborator

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@xhochy xhochy force-pushed the hash-logging-is-indeterministic branch from 18dbd35 to d8e2cdf Compare April 29, 2019 20:37
@xhochy xhochy force-pushed the hash-logging-is-indeterministic branch from d8e2cdf to 4c6f863 Compare April 29, 2019 21:15
@xhochy
Copy link
Author

xhochy commented Aug 4, 2019

bump can any maintainer have a look at this?

@sergiud sergiud self-requested a review August 4, 2019 18:56
@@ -33,6 +33,7 @@

#include <functional>
#include <iostream>
#include <iterator>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

std::find requires <algorithm>. What do you need <iterator> for?

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

Successfully merging this pull request may close these issues.

Test stl_logging fails in macOS CMake build
3 participants