xref: /llvm-project/libcxx/test/std/numerics/rand/rand.predef/minstd_rand0.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 linear_congruential_engine<uint_fast32_t, 16807, 0, 2147483647>
12 //                                                                 minstd_rand0;
13 
14 #include <random>
15 #include <cassert>
16 
17 #include "test_macros.h"
18 
main(int,char **)19 int main(int, char**)
20 {
21     std::minstd_rand0 e;
22     e.discard(9999);
23     assert(e() == 1043618065u);
24 
25   return 0;
26 }
27