summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libcxx/test/libcxx/selftest/test_macros.pass.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/libcxx/test/libcxx/selftest/test_macros.pass.cpp b/libcxx/test/libcxx/selftest/test_macros.pass.cpp
index 78679f6d148..69e75b78871 100644
--- a/libcxx/test/libcxx/selftest/test_macros.pass.cpp
+++ b/libcxx/test/libcxx/selftest/test_macros.pass.cpp
@@ -8,6 +8,7 @@
//===----------------------------------------------------------------------===//
//
// Test the "test_macros.h" header.
+#include <__config>
#include "test_macros.h"
#ifndef TEST_STD_VER
@@ -30,7 +31,36 @@ void test_noexcept() TEST_NOEXCEPT
{
}
+void test_libcxx_macros()
+{
+// ===== C++14 features =====
+// defined(TEST_HAS_EXTENDED_CONSTEXPR) != defined(_LIBCPP_HAS_NO_CXX14_CONSTEXPR)
+#ifdef TEST_HAS_EXTENDED_CONSTEXPR
+# ifdef _LIBCPP_HAS_NO_CXX14_CONSTEXPR
+# error "TEST_EXTENDED_CONSTEXPR mismatch (1)"
+# endif
+#else
+# ifndef _LIBCPP_HAS_NO_CXX14_CONSTEXPR
+# error "TEST_EXTENDED_CONSTEXPR mismatch (2)"
+# endif
+#endif
+
+// defined(TEST_HAS_VARIABLE_TEMPLATES) != defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
+#ifdef TEST_HAS_VARIABLE_TEMPLATES
+# ifdef _LIBCPP_HAS_NO_VARIABLE_TEMPLATES
+# error "TEST_VARIABLE_TEMPLATES mismatch (1)"
+# endif
+#else
+# ifndef _LIBCPP_HAS_NO_VARIABLE_TEMPLATES
+# error "TEST_VARIABLE_TEMPLATES mismatch (2)"
+# endif
+#endif
+
+// ===== C++1z features =====
+}
+
int main()
{
test_noexcept();
+ test_libcxx_macros();
}
OpenPOWER on IntegriCloud