Protect nested-exceptions tests under no-exceptions

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



git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@286813 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Roger Ferrer Ibanez
2016-11-14 11:00:28 +00:00
parent bc464e50e9
commit 70e4c503de
3 changed files with 12 additions and 3 deletions

View File

@@ -7,7 +7,6 @@
//
//===----------------------------------------------------------------------===//
// XFAIL: libcpp-no-exceptions
// <exception>
// class nested_exception;
@@ -17,6 +16,8 @@
#include <exception>
#include <cassert>
#include "test_macros.h"
class A
{
int data_;
@@ -34,6 +35,7 @@ int main()
e = e0;
assert(e.nested_ptr() == nullptr);
}
#ifndef TEST_HAS_NO_EXCEPTIONS
{
try
{
@@ -57,4 +59,5 @@ int main()
}
}
}
#endif
}