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 p, size_t r> 12 // class discard_block_engine 13 14 // result_type operator()(); 15 16 #include <random> 17 #include <cassert> 18 19 void 20 test1() 21 { 22 std::ranlux24 e; 23 assert(e() == 15039276u); 24 assert(e() == 16323925u); 25 assert(e() == 14283486u); 26 } 27 28 void 29 test2() 30 { 31 std::ranlux48 e; 32 assert(e() == 23459059301164ull); 33 assert(e() == 28639057539807ull); 34 assert(e() == 276846226770426ull); 35 } 36 37 int main(int, char**) 38 { 39 test1(); 40 test2(); 41 42 return 0; 43 } 44