aboutsummaryrefslogtreecommitdiff
path: root/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/max.pass.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/max.pass.cpp')
-rw-r--r--test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/max.pass.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/max.pass.cpp b/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/max.pass.cpp
new file mode 100644
index 000000000000..204cd7c0c97b
--- /dev/null
+++ b/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/max.pass.cpp
@@ -0,0 +1,28 @@
+//===----------------------------------------------------------------------===//
+//
+// 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>
+
+// template<class RealType = double>
+// class exponential_distribution
+
+// result_type max() const;
+
+#include <random>
+#include <cassert>
+
+int main()
+{
+ {
+ typedef std::exponential_distribution<> D;
+ D d(.25);
+ D::result_type m = d.max();
+ assert(m == std::numeric_limits<D::result_type>::infinity());
+ }
+}