diff options
author | Asiri Rathnayake <asiri.rathnayake@arm.com> | 2016-05-28 08:57:35 +0000 |
---|---|---|
committer | Asiri Rathnayake <asiri.rathnayake@arm.com> | 2016-05-28 08:57:35 +0000 |
commit | 6edc12c8867fe8d21f9abf97b160d12dc2fa3954 (patch) | |
tree | b05c2b476059d6ecf37ebee52db35c369cd0a74d /libcxx/test/std/utilities/memory/unique.ptr/unique.ptr.create | |
parent | 6abd38bf6efc809654fcdf6c98d4378fcc4a040b (diff) | |
download | bcm5719-llvm-6edc12c8867fe8d21f9abf97b160d12dc2fa3954.tar.gz bcm5719-llvm-6edc12c8867fe8d21f9abf97b160d12dc2fa3954.zip |
[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
llvm-svn: 271108
Diffstat (limited to 'libcxx/test/std/utilities/memory/unique.ptr/unique.ptr.create')
2 files changed, 2 insertions, 4 deletions
diff --git a/libcxx/test/std/utilities/memory/unique.ptr/unique.ptr.create/make_unique.array.pass.cpp b/libcxx/test/std/utilities/memory/unique.ptr/unique.ptr.create/make_unique.array.pass.cpp index b2fb58f529f..a1e71796c28 100644 --- a/libcxx/test/std/utilities/memory/unique.ptr/unique.ptr.create/make_unique.array.pass.cpp +++ b/libcxx/test/std/utilities/memory/unique.ptr/unique.ptr.create/make_unique.array.pass.cpp @@ -7,6 +7,7 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03, c++11 #include <memory> #include <string> #include <cassert> @@ -23,7 +24,6 @@ private: int main() { -#if _LIBCPP_STD_VER > 11 { auto p1 = std::make_unique<int[]>(5); for ( int i = 0; i < 5; ++i ) @@ -41,5 +41,4 @@ int main() for ( int i = 0; i < 7; ++i ) assert ( p3[i].get () == 3 ); } -#endif // _LIBCPP_STD_VER > 11 } diff --git a/libcxx/test/std/utilities/memory/unique.ptr/unique.ptr.create/make_unique.single.pass.cpp b/libcxx/test/std/utilities/memory/unique.ptr/unique.ptr.create/make_unique.single.pass.cpp index 7326ed22655..eddebdcc7fe 100644 --- a/libcxx/test/std/utilities/memory/unique.ptr/unique.ptr.create/make_unique.single.pass.cpp +++ b/libcxx/test/std/utilities/memory/unique.ptr/unique.ptr.create/make_unique.single.pass.cpp @@ -7,13 +7,13 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03, c++11 #include <memory> #include <string> #include <cassert> int main() { -#if _LIBCPP_STD_VER > 11 { std::unique_ptr<int> p1 = std::make_unique<int>(1); assert ( *p1 == 1 ); @@ -29,5 +29,4 @@ int main() p2 = std::make_unique<std::string> ( 6, 'z' ); assert ( *p2 == "zzzzzz" ); } -#endif // _LIBCPP_STD_VER > 11 } |