This revision was automatically updated to reflect the committed changes.
Closed by commit rL288165: Protect std::array tests under noexceptions 
(authored by rogfer01).

Changed prior to commit:
  https://reviews.llvm.org/D27095?vs=79589&id=79591#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D27095

Files:
  libcxx/trunk/test/std/containers/sequences/array/at.pass.cpp


Index: libcxx/trunk/test/std/containers/sequences/array/at.pass.cpp
===================================================================
--- libcxx/trunk/test/std/containers/sequences/array/at.pass.cpp
+++ libcxx/trunk/test/std/containers/sequences/array/at.pass.cpp
@@ -7,7 +7,6 @@
 //
 
//===----------------------------------------------------------------------===//
 
-// XFAIL: libcpp-no-exceptions
 // <array>
 
 // reference operator[] (size_type)
@@ -40,8 +39,14 @@
         r2 = 7.5;
         assert(c.back() == 7.5);
 
-        try { (void) c.at(3); }
+#ifndef TEST_HAS_NO_EXCEPTIONS
+        try
+        {
+            (void) c.at(3);
+            assert(false);
+        }
         catch (const std::out_of_range &) {}
+#endif
     }
     {
         typedef double T;
@@ -53,8 +58,14 @@
         C::const_reference r2 = c.at(2);
         assert(r2 == 3.5);
 
-        try { (void) c.at(3); }
+#ifndef TEST_HAS_NO_EXCEPTIONS
+        try
+        {
+            (void) c.at(3);
+            assert(false);
+        }
         catch (const std::out_of_range &) {}
+#endif
     }
 
 #if TEST_STD_VER > 11


Index: libcxx/trunk/test/std/containers/sequences/array/at.pass.cpp
===================================================================
--- libcxx/trunk/test/std/containers/sequences/array/at.pass.cpp
+++ libcxx/trunk/test/std/containers/sequences/array/at.pass.cpp
@@ -7,7 +7,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: libcpp-no-exceptions
 // <array>
 
 // reference operator[] (size_type)
@@ -40,8 +39,14 @@
         r2 = 7.5;
         assert(c.back() == 7.5);
 
-        try { (void) c.at(3); }
+#ifndef TEST_HAS_NO_EXCEPTIONS
+        try
+        {
+            (void) c.at(3);
+            assert(false);
+        }
         catch (const std::out_of_range &) {}
+#endif
     }
     {
         typedef double T;
@@ -53,8 +58,14 @@
         C::const_reference r2 = c.at(2);
         assert(r2 == 3.5);
 
-        try { (void) c.at(3); }
+#ifndef TEST_HAS_NO_EXCEPTIONS
+        try
+        {
+            (void) c.at(3);
+            assert(false);
+        }
         catch (const std::out_of_range &) {}
+#endif
     }
 
 #if TEST_STD_VER > 11
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to