Fix std::experimental::optional tests. Patch from Casey Carter.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@275732 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -20,6 +20,8 @@
|
||||
#include <memory>
|
||||
#include <cassert>
|
||||
|
||||
#include "test_macros.h"
|
||||
|
||||
int main()
|
||||
{
|
||||
using std::experimental::optional;
|
||||
@@ -38,7 +40,7 @@ int main()
|
||||
std::string s("123");
|
||||
optional<std::string> opt = make_optional(std::move(s));
|
||||
assert(*opt == "123");
|
||||
assert(s.empty());
|
||||
LIBCPP_ASSERT(s.empty());
|
||||
}
|
||||
{
|
||||
std::unique_ptr<int> s(new int(3));
|
||||
|
||||
Reference in New Issue
Block a user