rogfer01 created this revision.
rogfer01 added reviewers: mclow.lists, EricWF, rmaprath.
rogfer01 added a subscriber: cfe-commits.

Skip tests that expect exceptions be thrown.


https://reviews.llvm.org/D27095

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


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


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