mirror of
https://github.com/llvm-mirror/libcxx.git
synced 2025-10-24 03:32:35 +08:00
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:
@@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user