aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/libstdc++-v3/testsuite/ext/random/hypergeometric_distribution/pr60037.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/libstdc++-v3/testsuite/ext/random/hypergeometric_distribution/pr60037.cc')
-rw-r--r--gcc-4.9/libstdc++-v3/testsuite/ext/random/hypergeometric_distribution/pr60037.cc23
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc-4.9/libstdc++-v3/testsuite/ext/random/hypergeometric_distribution/pr60037.cc b/gcc-4.9/libstdc++-v3/testsuite/ext/random/hypergeometric_distribution/pr60037.cc
new file mode 100644
index 000000000..d3088a6ec
--- /dev/null
+++ b/gcc-4.9/libstdc++-v3/testsuite/ext/random/hypergeometric_distribution/pr60037.cc
@@ -0,0 +1,23 @@
+// { dg-options "-std=gnu++11 -O0" }
+// { dg-require-cstdint "" }
+// { dg-require-cmath "" }
+
+#include <ext/random>
+#include <functional>
+
+void
+hyperplot(unsigned int N, unsigned int K, unsigned int n)
+{
+ std::mt19937 re; // the default engine
+ __gnu_cxx::hypergeometric_distribution<> hd(N, K, n);
+ auto gen = std::bind(hd, re);
+ gen();
+}
+
+int
+main()
+{
+ hyperplot(15, 3, 2);
+ hyperplot(500, 50, 30);
+ hyperplot(100, 20, 5);
+}