Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / third_party / libc++ / trunk / test / numerics / rand / rand.device / eval.pass.cpp
index 2422635..72aff07 100644 (file)
 
 int main()
 {
-    std::random_device r;
-    std::random_device::result_type e = r();
+    {
+        std::random_device r;
+        std::random_device::result_type e = r();
+    }
+
+    try
+    {
+        std::random_device r("/dev/null");
+        r();
+        assert(false);
+    }
+    catch (const std::system_error& e)
+    {
+    }
 }