5 Commits

Author SHA1 Message Date
Andrew Noyes
78b202f3a4 Apply A.J.'s suggestion to randomInt as well 2019-12-05 11:01:41 -08:00
Andrew Noyes
cf5cdc4e93
Update flow/DeterministicRandom.cpp
Include equality now that we've adjusted the value by 1.

Co-Authored-By: A.J. Beamon <ajbeamon@users.noreply.github.com>
2019-12-05 11:01:03 -08:00
Andrew Noyes
b09f0b334b Take A.J.'s suggestion, which fixes A.J.s counterexample 2019-12-05 10:27:35 -08:00
Andrew Noyes
89a093e035 Accept UBSAN's suggestion
/home/anoyes/workspace/foundationdb/flow/DeterministicRandom.cpp:72:29: runtime error: negation of -9223372036854775808 cannot be represented in type 'long int'; cast to an unsigned type to negate this value to itself
2019-12-04 16:45:45 -08:00
Andrew Noyes
4f943be21d Move DeterministicRandom impl to its own translation unit
This will allow me to recompile faster after making changes, and should
(slightly) speed up overall compilation.

I manually verified that the unseed matched for one test before and
after this change, so I probably didn't screw up the refactor
2019-12-04 16:45:32 -08:00