Skip to content
Commit 09c311b9 authored by Stephan T. Lavavej's avatar Stephan T. Lavavej
Browse files

[libcxx] [test] D26816: Fix non-Standard assumptions when testing sample().

sample() isn't specified with a reproducible algorithm, so expecting
exact output is non-Standard. Mark those tests with LIBCPP_ASSERT.

In test_small_population(), we're guaranteed to get all of the elements,
but not necessarily in their original order. When PopulationCategory is
forward, we're guaranteed stability (and can therefore test equal()).
Otherwise, we can only test is_permutation(). (As it happens, both libcxx
and MSVC's STL provide stability in this scenario for input-only iterators.)

llvm-svn: 287383
parent b04c795e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment