diff options
Diffstat (limited to 'libcxx/test/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bernoulli/get_param.pass.cpp')
-rw-r--r-- | libcxx/test/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bernoulli/get_param.pass.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/libcxx/test/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bernoulli/get_param.pass.cpp b/libcxx/test/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bernoulli/get_param.pass.cpp new file mode 100644 index 00000000000..021eb0e188b --- /dev/null +++ b/libcxx/test/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bernoulli/get_param.pass.cpp @@ -0,0 +1,28 @@ +//===----------------------------------------------------------------------===// +// +// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// <random> + +// class bernoulli_distribution + +// param_type param() const; + +#include <random> +#include <cassert> + +int main() +{ + { + typedef std::bernoulli_distribution D; + typedef D::param_type P; + P p(.125); + D d(p); + assert(d.param() == p); + } +} |