diff options
Diffstat (limited to 'libcxx/test')
| -rw-r--r-- | libcxx/test/numerics/rand/rand.device/eval.pass.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/libcxx/test/numerics/rand/rand.device/eval.pass.cpp b/libcxx/test/numerics/rand/rand.device/eval.pass.cpp index 2422635c92f..72aff076a5d 100644 --- a/libcxx/test/numerics/rand/rand.device/eval.pass.cpp +++ b/libcxx/test/numerics/rand/rand.device/eval.pass.cpp @@ -18,6 +18,18 @@ 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) + { + } } |

