summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/numerics/rand/rand.device/entropy.pass.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/test/std/numerics/rand/rand.device/entropy.pass.cpp')
-rw-r--r--libcxx/test/std/numerics/rand/rand.device/entropy.pass.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/libcxx/test/std/numerics/rand/rand.device/entropy.pass.cpp b/libcxx/test/std/numerics/rand/rand.device/entropy.pass.cpp
new file mode 100644
index 00000000000..f01e5653391
--- /dev/null
+++ b/libcxx/test/std/numerics/rand/rand.device/entropy.pass.cpp
@@ -0,0 +1,23 @@
+//===----------------------------------------------------------------------===//
+//
+// 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>
+
+// class random_device;
+
+// double entropy() const;
+
+#include <random>
+#include <cassert>
+
+int main()
+{
+ std::random_device r;
+ double e = r.entropy();
+}
OpenPOWER on IntegriCloud