[libcxx] r275184 - Add tests for the meta.unary.props that do not require a complete type. This is part of LWG#2582

Marshall Clow via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 12 08:50:54 PDT 2016


Author: marshall
Date: Tue Jul 12 10:50:53 2016
New Revision: 275184

URL: http://llvm.org/viewvc/llvm-project?rev=275184&view=rev
Log:
Add tests for the meta.unary.props that do not require a complete type. This is part of LWG#2582

Modified:
    libcxx/trunk/test/std/utilities/meta/meta.unary/meta.unary.prop/is_const.pass.cpp
    libcxx/trunk/test/std/utilities/meta/meta.unary/meta.unary.prop/is_signed.pass.cpp
    libcxx/trunk/test/std/utilities/meta/meta.unary/meta.unary.prop/is_unsigned.pass.cpp
    libcxx/trunk/test/std/utilities/meta/meta.unary/meta.unary.prop/is_volatile.pass.cpp

Modified: libcxx/trunk/test/std/utilities/meta/meta.unary/meta.unary.prop/is_const.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/meta/meta.unary/meta.unary.prop/is_const.pass.cpp?rev=275184&r1=275183&r2=275184&view=diff
==============================================================================
--- libcxx/trunk/test/std/utilities/meta/meta.unary/meta.unary.prop/is_const.pass.cpp (original)
+++ libcxx/trunk/test/std/utilities/meta/meta.unary/meta.unary.prop/is_const.pass.cpp Tue Jul 12 10:50:53 2016
@@ -29,6 +29,8 @@ void test_is_const()
 #endif
 }
 
+struct A; // incomplete
+
 int main()
 {
     test_is_const<void>();
@@ -39,6 +41,8 @@ int main()
     test_is_const<char[3]>();
     test_is_const<char[]>();
 
+    test_is_const<A>();
+
     static_assert(!std::is_const<int&>::value, "");
     static_assert(!std::is_const<const int&>::value, "");
 }

Modified: libcxx/trunk/test/std/utilities/meta/meta.unary/meta.unary.prop/is_signed.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/meta/meta.unary/meta.unary.prop/is_signed.pass.cpp?rev=275184&r1=275183&r2=275184&view=diff
==============================================================================
--- libcxx/trunk/test/std/utilities/meta/meta.unary/meta.unary.prop/is_signed.pass.cpp (original)
+++ libcxx/trunk/test/std/utilities/meta/meta.unary/meta.unary.prop/is_signed.pass.cpp Tue Jul 12 10:50:53 2016
@@ -50,6 +50,8 @@ public:
     ~Class();
 };
 
+struct A; // incomplete
+
 int main()
 {
     test_is_not_signed<void>();
@@ -61,6 +63,7 @@ int main()
     test_is_not_signed<char[]>();
     test_is_not_signed<bool>();
     test_is_not_signed<unsigned>();
+    test_is_not_signed<A>();
 
     test_is_signed<int>();
     test_is_signed<double>();

Modified: libcxx/trunk/test/std/utilities/meta/meta.unary/meta.unary.prop/is_unsigned.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/meta/meta.unary/meta.unary.prop/is_unsigned.pass.cpp?rev=275184&r1=275183&r2=275184&view=diff
==============================================================================
--- libcxx/trunk/test/std/utilities/meta/meta.unary/meta.unary.prop/is_unsigned.pass.cpp (original)
+++ libcxx/trunk/test/std/utilities/meta/meta.unary/meta.unary.prop/is_unsigned.pass.cpp Tue Jul 12 10:50:53 2016
@@ -50,6 +50,8 @@ public:
     ~Class();
 };
 
+struct A; // incomplete
+
 int main()
 {
     test_is_not_unsigned<void>();
@@ -61,6 +63,7 @@ int main()
     test_is_not_unsigned<char[]>();
     test_is_not_unsigned<int>();
     test_is_not_unsigned<double>();
+    test_is_not_unsigned<A>();
 
     test_is_unsigned<bool>();
     test_is_unsigned<unsigned>();

Modified: libcxx/trunk/test/std/utilities/meta/meta.unary/meta.unary.prop/is_volatile.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/meta/meta.unary/meta.unary.prop/is_volatile.pass.cpp?rev=275184&r1=275183&r2=275184&view=diff
==============================================================================
--- libcxx/trunk/test/std/utilities/meta/meta.unary/meta.unary.prop/is_volatile.pass.cpp (original)
+++ libcxx/trunk/test/std/utilities/meta/meta.unary/meta.unary.prop/is_volatile.pass.cpp Tue Jul 12 10:50:53 2016
@@ -29,6 +29,8 @@ void test_is_volatile()
 #endif
 }
 
+struct A; // incomplete
+
 int main()
 {
     test_is_volatile<void>();
@@ -39,6 +41,8 @@ int main()
     test_is_volatile<char[3]>();
     test_is_volatile<char[]>();
 
+    test_is_volatile<A>();
+
     static_assert(!std::is_volatile<int&>::value, "");
     static_assert(!std::is_volatile<volatile int&>::value, "");
 }




More information about the cfe-commits mailing list