Commit Graph

11 Commits

Author SHA1 Message Date
Roger Ferrer Ibanez
240b8c875b Protect std::experimental::optional tests under libcpp-no-exceptions
In these tests there are some paths that explicitly throw, so use
the TEST_THROW macro that was proposed for this and then skip the tests
that may enter the throwing path.

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



git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@286099 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-07 08:23:59 +00:00
Eric Fiselier
46c0fcb2b3 Update status for std::optional LWG issues and fix an optional SFINAE bug
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@284323 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-16 03:21:35 +00:00
Eric Fiselier
3a3836f6bc Avoid compile error by giving the test type a user defined default constructor
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@280780 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-07 03:50:36 +00:00
Eric Fiselier
b9231a2326 Fix PR30260 - optional<const T> not working.
This patch fixes PR30260 by using a (void*) cast on the placement argument
to placement new to casts away the const. See also http://llvm.org/PR30260.

As a drive by change this patch also changes the header guard for
<experimental/optional> to _LIBCPP_EXPERIMENTAL_OPTIONAL from _LIBCPP_OPTIONAL.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@280775 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-07 01:56:07 +00:00
Eric Fiselier
3e732e94ae 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
2016-07-17 20:32:30 +00:00
Eric Fiselier
84acb1ec3f Remove trailing whitespace in test suite. Approved by Marshall Clow.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@271435 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-01 21:35:39 +00:00
Asiri Rathnayake
a3eac518e6 [libcxx] Improve tests to use the UNSUPPORTED lit directive
Quite a few libcxx tests seem to follow the format:
 #if _LIBCPP_STD_VER > X
   // Do test.
 #else
   // Empty test.
 #endif
We should instead use the UNSUPPORTED lit directive to exclude the test on
earlier C++ standards. This gives us a more accurate number of test passes
for those standards and avoids unnecessary conflicts with other lit
directives on the same tests.

Reviewers: bcraig, ericwf, mclow.lists

Differential revision: http://reviews.llvm.org/D20730

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@271108 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-28 08:57:35 +00:00
Asiri Rathnayake
cc2e93cff0 Make it possible to build a no-exceptions variant of libcxx.
Fixes a small omission in libcxx that prevents libcxx being built when
-DLIBCXX_ENABLE_EXCEPTIONS=0 is specified.

This patch adds XFAILS to all those tests that are currently failing
on the new -fno-exceptions library variant. Follow-up patches will
update the tests (progressively) to cope with the new library variant.

Change-Id: I4b801bd8d8e4fe7193df9e55f39f1f393a8ba81a

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@252598 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-10 11:41:22 +00:00
Eric Fiselier
408369b7c9 Suppress clang warnings in some tests
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@246399 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-30 22:04:20 +00:00
Marshall Clow
e26488fd83 Remove non-const test to get test passing. Will come back later and (correctly) add non-const tests
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@224748 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-23 01:30:39 +00:00
Eric Fiselier
a90c6dd460 Move test into test/std subdirectory.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@224658 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-20 01:40:03 +00:00