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

View File

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

View File

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