Add some checking so that the TEST_HAS_XXX macros match up with the _LIBCPP_NO_HAS_XXX macros. No functional change

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@269773 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/libcxx/selftest/test_macros.pass.cpp b/test/libcxx/selftest/test_macros.pass.cpp
index 78679f6..69e75b7 100644
--- a/test/libcxx/selftest/test_macros.pass.cpp
+++ b/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_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();
 }