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-exception 6 // 7 //===----------------------------------------------------------------------===// 8 9 // <random> 10 11 // template<class Engine, size_t k> 12 // class shuffle_order_engine 13 14 // template<class Sseq> void seed(Sseq& q); 15 16 #include <random> 17 #include <cassert> 18 19 #include "test_macros.h" 20 21 void test1()22test1() 23 { 24 unsigned a[] = {3, 5, 7}; 25 std::seed_seq sseq(a, a+3); 26 std::knuth_b e1; 27 std::knuth_b e2(sseq); 28 assert(e1 != e2); 29 e1.seed(sseq); 30 assert(e1 == e2); 31 } 32 main(int,char **)33int main(int, char**) 34 { 35 test1(); 36 37 return 0; 38 } 39