summaryrefslogtreecommitdiff
path: root/test/std/numerics/rand/rand.device/ctor.pass.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/std/numerics/rand/rand.device/ctor.pass.cpp')
-rw-r--r--test/std/numerics/rand/rand.device/ctor.pass.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/std/numerics/rand/rand.device/ctor.pass.cpp b/test/std/numerics/rand/rand.device/ctor.pass.cpp
index 8c45bb19a0a6..730576844a0b 100644
--- a/test/std/numerics/rand/rand.device/ctor.pass.cpp
+++ b/test/std/numerics/rand/rand.device/ctor.pass.cpp
@@ -7,7 +7,6 @@
//
//===----------------------------------------------------------------------===//
-// XFAIL: libcpp-no-exceptions
// <random>
// class random_device;
@@ -44,11 +43,15 @@ void check_random_device_valid(const std::string &token) {
}
void check_random_device_invalid(const std::string &token) {
+#ifndef TEST_HAS_NO_EXCEPTIONS
try {
std::random_device r(token);
LIBCPP_ASSERT(false);
} catch (const std::system_error&) {
}
+#else
+ ((void)token);
+#endif
}