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 // class seed_seq;
12 
13 // template<class InputIterator>
14 //     seed_seq(InputIterator begin, InputIterator end);
15 
16 #include <random>
17 #include <cassert>
18 
19 #include "test_macros.h"
20 
21 int main(int, char**)
22 {
23     unsigned a[5] = {5, 4, 3, 2, 1};
24     std::seed_seq s(a, a+5);
25     assert(s.size() == 5);
26     unsigned b[5] = {0};
27     s.param(b);
28     assert(b[0] == 5);
29     assert(b[1] == 4);
30     assert(b[2] == 3);
31     assert(b[3] == 2);
32     assert(b[4] == 1);
33 
34   return 0;
35 }
36