This revision was automatically updated to reflect the committed changes.
Closed by commit rL285677: Protect tests that expect an exception for an 
unknown std::random_device (authored by rogfer01).

Changed prior to commit:
  https://reviews.llvm.org/D26141?vs=76378&id=76527#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D26141

Files:
  libcxx/trunk/test/std/numerics/rand/rand.device/ctor.pass.cpp
  libcxx/trunk/test/std/numerics/rand/rand.device/eval.pass.cpp


Index: libcxx/trunk/test/std/numerics/rand/rand.device/eval.pass.cpp
===================================================================
--- libcxx/trunk/test/std/numerics/rand/rand.device/eval.pass.cpp
+++ libcxx/trunk/test/std/numerics/rand/rand.device/eval.pass.cpp
@@ -7,7 +7,6 @@
 //
 
//===----------------------------------------------------------------------===//
 
-// XFAIL: libcpp-no-exceptions
 // <random>
 
 // class random_device;
@@ -26,6 +25,7 @@
         std::random_device::result_type e = r();
     }
 
+#ifndef TEST_HAS_NO_EXCEPTIONS
     try
     {
         std::random_device r("/dev/null");
@@ -35,4 +35,5 @@
     catch (const std::system_error&)
     {
     }
+#endif
 }
Index: libcxx/trunk/test/std/numerics/rand/rand.device/ctor.pass.cpp
===================================================================
--- libcxx/trunk/test/std/numerics/rand/rand.device/ctor.pass.cpp
+++ libcxx/trunk/test/std/numerics/rand/rand.device/ctor.pass.cpp
@@ -7,7 +7,6 @@
 //
 
//===----------------------------------------------------------------------===//
 
-// XFAIL: libcpp-no-exceptions
 // <random>
 
 // class random_device;
@@ -44,11 +43,13 @@
 }
 
 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&) {
   }
+#endif
 }
 
 


Index: libcxx/trunk/test/std/numerics/rand/rand.device/eval.pass.cpp
===================================================================
--- libcxx/trunk/test/std/numerics/rand/rand.device/eval.pass.cpp
+++ libcxx/trunk/test/std/numerics/rand/rand.device/eval.pass.cpp
@@ -7,7 +7,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: libcpp-no-exceptions
 // <random>
 
 // class random_device;
@@ -26,6 +25,7 @@
         std::random_device::result_type e = r();
     }
 
+#ifndef TEST_HAS_NO_EXCEPTIONS
     try
     {
         std::random_device r("/dev/null");
@@ -35,4 +35,5 @@
     catch (const std::system_error&)
     {
     }
+#endif
 }
Index: libcxx/trunk/test/std/numerics/rand/rand.device/ctor.pass.cpp
===================================================================
--- libcxx/trunk/test/std/numerics/rand/rand.device/ctor.pass.cpp
+++ libcxx/trunk/test/std/numerics/rand/rand.device/ctor.pass.cpp
@@ -7,7 +7,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: libcpp-no-exceptions
 // <random>
 
 // class random_device;
@@ -44,11 +43,13 @@
 }
 
 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&) {
   }
+#endif
 }
 
 
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to