diff options
Diffstat (limited to 'libcxx/test/std/numerics/rand/rand.predef/default_random_engine.pass.cpp')
-rw-r--r-- | libcxx/test/std/numerics/rand/rand.predef/default_random_engine.pass.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/libcxx/test/std/numerics/rand/rand.predef/default_random_engine.pass.cpp b/libcxx/test/std/numerics/rand/rand.predef/default_random_engine.pass.cpp new file mode 100644 index 00000000000..426586007c1 --- /dev/null +++ b/libcxx/test/std/numerics/rand/rand.predef/default_random_engine.pass.cpp @@ -0,0 +1,22 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// <random> + +// typedef minstd_rand0 default_random_engine; + +#include <random> +#include <cassert> + +int main() +{ + std::default_random_engine e; + e.discard(9999); + assert(e() == 399268537u); +} |