46 lines · cpp
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-exception6//7//===----------------------------------------------------------------------===//8 9// <random>10 11// template<class Engine, size_t p, size_t r>12// class discard_block_engine13 14// result_type operator()();15 16#include <random>17#include <cassert>18 19#include "test_macros.h"20 21void22test1()23{24 std::ranlux24 e;25 assert(e() == 15039276u);26 assert(e() == 16323925u);27 assert(e() == 14283486u);28}29 30void31test2()32{33 std::ranlux48 e;34 assert(e() == 23459059301164ull);35 assert(e() == 28639057539807ull);36 assert(e() == 276846226770426ull);37}38 39int main(int, char**)40{41 test1();42 test2();43 44 return 0;45}46