xref: /llvm-project/libcxx/test/std/numerics/rand/rand.predef/mt19937.pass.cpp (revision 7fc6a55688c816f5fc1a5481ae7af25be7500356)
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 // typedef mersenne_twister_engine<uint_fast32_t, 32, 624, 397, 31,
12 //                                 0x9908b0df,
13 //                                 11, 0xffffffff,
14 //                                 7,  0x9d2c5680,
15 //                                 15, 0xefc60000,
16 //                                 18, 1812433253>                      mt19937;
17 
18 #include <random>
19 #include <cassert>
20 
21 #include "test_macros.h"
22 
main(int,char **)23 int main(int, char**)
24 {
25     std::mt19937 e;
26     e.discard(9999);
27     assert(e() == 4123659995u);
28 
29   return 0;
30 }
31