Adjust two tests to account for a nasty change in copying behavior
between C++03 and C++0x and its effect on exceptions, and another two to not test move construction when rvalue references are not available. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@135445 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -85,9 +85,17 @@ int main()
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
assert(A::count == 1);
|
||||
assert(B::count == 1);
|
||||
assert(ptr.get() == raw_ptr);
|
||||
#else
|
||||
// Without rvalue references, ptr got copied into
|
||||
// the shared_ptr destructor and the copy was
|
||||
// destroyed during unwinding.
|
||||
assert(A::count == 0);
|
||||
assert(B::count == 0);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
assert(A::count == 0);
|
||||
|
||||
@@ -77,9 +77,15 @@ int main()
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
assert(A::count == 1);
|
||||
assert(B::count == 1);
|
||||
assert(ptr.get() == raw_ptr);
|
||||
#else
|
||||
assert(A::count == 0);
|
||||
assert(B::count == 0);
|
||||
assert(ptr.get() == 0);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
assert(A::count == 0);
|
||||
|
||||
Reference in New Issue
Block a user