Index: libcxx/trunk/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/unique_ptr.pass.cpp =================================================================== --- libcxx/trunk/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/unique_ptr.pass.cpp +++ libcxx/trunk/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/unique_ptr.pass.cpp @@ -7,7 +7,6 @@ // //===----------------------------------------------------------------------===// -// XFAIL: libcpp-no-exceptions // UNSUPPORTED: sanitizer-new-delete // @@ -63,6 +62,7 @@ assert(p.get() == raw_ptr); assert(ptr.get() == 0); } +#ifndef TEST_HAS_NO_EXCEPTIONS assert(A::count == 0); { std::unique_ptr ptr(new A); @@ -86,6 +86,7 @@ #endif } } +#endif assert(A::count == 0); { // LWG 2399 fn(std::unique_ptr(new int)); Index: libcxx/trunk/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/weak_ptr.pass.cpp =================================================================== --- libcxx/trunk/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/weak_ptr.pass.cpp +++ libcxx/trunk/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/weak_ptr.pass.cpp @@ -7,7 +7,6 @@ // //===----------------------------------------------------------------------===// -// XFAIL: libcpp-no-exceptions // // shared_ptr @@ -17,6 +16,8 @@ #include #include +#include "test_macros.h" + struct B { static int count; @@ -42,6 +43,7 @@ int main() { +#ifndef TEST_HAS_NO_EXCEPTIONS { std::weak_ptr wp; try @@ -54,6 +56,7 @@ } assert(A::count == 0); } +#endif { std::shared_ptr sp0(new A); std::weak_ptr wp(sp0); @@ -63,6 +66,7 @@ assert(A::count == 1); } assert(A::count == 0); +#ifndef TEST_HAS_NO_EXCEPTIONS { std::shared_ptr sp0(new A); std::weak_ptr wp(sp0); @@ -77,4 +81,5 @@ } } assert(A::count == 0); +#endif }