summaryrefslogtreecommitdiffstats
path: root/libcxx/test
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/test')
-rw-r--r--libcxx/test/std/depr/depr.c.headers/stddef_h.pass.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/libcxx/test/std/depr/depr.c.headers/stddef_h.pass.cpp b/libcxx/test/std/depr/depr.c.headers/stddef_h.pass.cpp
index 140c91b53e6..c03c314e3bc 100644
--- a/libcxx/test/std/depr/depr.c.headers/stddef_h.pass.cpp
+++ b/libcxx/test/std/depr/depr.c.headers/stddef_h.pass.cpp
@@ -10,6 +10,7 @@
// <stddef.h>
#include <stddef.h>
+#include <cassert>
#include <type_traits>
#ifndef NULL
@@ -22,6 +23,9 @@
int main()
{
+ void *p = NULL;
+ assert(!p);
+
static_assert(sizeof(size_t) == sizeof(void*),
"sizeof(size_t) == sizeof(void*)");
static_assert(std::is_unsigned<size_t>::value,
@@ -34,4 +38,22 @@ int main()
"std::is_signed<ptrdiff_t>::value");
static_assert(std::is_integral<ptrdiff_t>::value,
"std::is_integral<ptrdiff_t>::value");
+ static_assert(std::is_same<decltype(nullptr), nullptr_t>::value,
+ "decltype(nullptr) == nullptr_t");
+ static_assert(sizeof(nullptr_t) == sizeof(void*),
+ "sizeof(nullptr_t) == sizeof(void*)");
+ static_assert(std::is_pod<max_align_t>::value,
+ "std::is_pod<max_align_t>::value");
+ static_assert((std::alignment_of<max_align_t>::value >=
+ std::alignment_of<long long>::value),
+ "std::alignment_of<max_align_t>::value >= "
+ "std::alignment_of<long long>::value");
+ static_assert(std::alignment_of<max_align_t>::value >=
+ std::alignment_of<long double>::value,
+ "std::alignment_of<max_align_t>::value >= "
+ "std::alignment_of<long double>::value");
+ static_assert(std::alignment_of<max_align_t>::value >=
+ std::alignment_of<void*>::value,
+ "std::alignment_of<max_align_t>::value >= "
+ "std::alignment_of<void*>::value");
}
OpenPOWER on IntegriCloud