brintos

brintos / llvm-project-archived public Read only

0
0
Text · 852 B · aab2941 Raw
42 lines · cpp
1//===----------------------------------------------------------------------===//2//3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.4// See https://llvm.org/LICENSE.txt for license information.5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception6//7//===----------------------------------------------------------------------===//8 9// <random>10 11// template<class Engine, size_t k>12// class shuffle_order_engine13 14// shuffle_order_engine(const shuffle_order_engine&);15 16#include <random>17#include <cassert>18 19#include "test_macros.h"20 21void22test1()23{24    typedef std::knuth_b E;25    E e1;26    (void)e1();27    E e2 = e1;28    assert(e1 == e2);29    assert(e1() == e2());30    E::result_type k = e1();31    assert(e1 != e2);32    assert(e2() == k);33    assert(e1 == e2);34}35 36int main(int, char**)37{38    test1();39 40  return 0;41}42