[libcxx] r288378 - Protect std::ostream::sentry test under libcpp-no-exceptions

Roger Ferrer Ibanez via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 1 09:31:39 PST 2016


Author: rogfer01
Date: Thu Dec  1 11:31:38 2016
New Revision: 288378

URL: http://llvm.org/viewvc/llvm-project?rev=288378&view=rev
Log:
Protect std::ostream::sentry test under libcpp-no-exceptions

Skip test that throws an exception.

Differential Revision: https://reviews.llvm.org/D27255


Modified:
    libcxx/trunk/test/std/input.output/iostream.format/output.streams/ostream_sentry/destruct.pass.cpp

Modified: libcxx/trunk/test/std/input.output/iostream.format/output.streams/ostream_sentry/destruct.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/input.output/iostream.format/output.streams/ostream_sentry/destruct.pass.cpp?rev=288378&r1=288377&r2=288378&view=diff
==============================================================================
--- libcxx/trunk/test/std/input.output/iostream.format/output.streams/ostream_sentry/destruct.pass.cpp (original)
+++ libcxx/trunk/test/std/input.output/iostream.format/output.streams/ostream_sentry/destruct.pass.cpp Thu Dec  1 11:31:38 2016
@@ -7,7 +7,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: libcpp-no-exceptions
 // <ostream>
 
 // template <class charT, class traits = char_traits<charT> >
@@ -18,6 +17,8 @@
 #include <ostream>
 #include <cassert>
 
+#include "test_macros.h"
+
 int sync_called = 0;
 
 template <class CharT>
@@ -58,6 +59,7 @@ int main()
         unitbuf(os);
     }
     assert(sync_called == 1);
+#ifndef TEST_HAS_NO_EXCEPTIONS
     {
         testbuf1<char> sb;
         std::ostream os(&sb);
@@ -73,4 +75,5 @@ int main()
         }
         assert(sync_called == 1);
     }
+#endif
 }




More information about the cfe-commits mailing list