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

