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 // explicit discard_block_engine(); 15 16 #include <random> 17 #include <cassert> 18 19 #include "test_macros.h" 20 21 void test1()22test1() 23 { 24 std::ranlux24 e1; 25 std::ranlux24 e2(std::ranlux24_base::default_seed); 26 assert(e1 == e2); 27 assert(e1() == 15039276); 28 } 29 30 void test2()31test2() 32 { 33 std::ranlux48 e1; 34 std::ranlux48 e2(std::ranlux48_base::default_seed); 35 assert(e1 == e2); 36 assert(e1() == 23459059301164ull); 37 } 38 main(int,char **)39int main(int, char**) 40 { 41 test1(); 42 test2(); 43 44 return 0; 45 } 46