This is an archive of the discontinued LLVM Phabricator instance.

[libcxx] [test] Fix portability issues in <random> tests.
ClosedPublic

Authored by STL_MSFT on Jul 8 2016, 12:19 PM.

Details

Summary

Fix portability issues in <random> tests.

Three tests were asserting equal() after shuffling a sequence, which assumes the exact behavior of libc++'s implementation. To be portable, yet retain some level of validation, I'm marking the equal() checks as libc++ specific, but adding unconditional is_permutation() checks.

Additionally, one test was assuming libc++'s choice of default_random_engine, which isn't guaranteed by the Standard. Mark that assert as libc++ specific.

Diff Detail

Event Timeline

STL_MSFT updated this revision to Diff 63280.Jul 8 2016, 12:19 PM
STL_MSFT retitled this revision from to [libcxx] [test] Fix portability issues in <random> tests..
STL_MSFT updated this object.
STL_MSFT added reviewers: EricWF, mclow.lists.
STL_MSFT added a subscriber: cfe-commits.
EricWF accepted this revision.Jul 24 2016, 4:43 PM
EricWF edited edge metadata.
This revision is now accepted and ready to land.Jul 24 2016, 4:43 PM
EricWF closed this revision.Jul 24 2016, 4:43 PM

r276585.