Эх сурвалжийг харах

Remove incorrect #ifdef guards around variant tests.

The tests were previously guarded by #if defined(_LIBCPP_VER) || defined(_MSVC_STL_VER),
which is both incorrect (e.g. _LIBCPP_VERSION) and unneeded. Although the tests are
technically non-standard (yet) they are supported by both libc++ and MSVC's STL.

libstdc++ doesn't regularly use the test suite so I'm not concerned about guarding these
tests for them.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@303953 91177308-0d34-0410-b5e6-96231b3b80d8
Eric Fiselier 8 жил өмнө
parent
commit
efcf07d44a

+ 1 - 2
test/std/utilities/variant/variant.variant/variant.ctor/copy.pass.cpp

@@ -149,7 +149,7 @@ constexpr bool test_constexpr_copy_ctor_extension_imp(
 }
 }
 
 
 void test_constexpr_copy_ctor_extension() {
 void test_constexpr_copy_ctor_extension() {
-#if defined(_LIBCPP_VER) || defined(_MSVC_STL_VER)
+  // NOTE: This test is for not yet standardized behavior.
   using V = std::variant<long, void*, const int>;
   using V = std::variant<long, void*, const int>;
 #ifdef TEST_WORKAROUND_C1XX_BROKEN_IS_TRIVIALLY_COPYABLE
 #ifdef TEST_WORKAROUND_C1XX_BROKEN_IS_TRIVIALLY_COPYABLE
   static_assert(std::is_trivially_destructible<V>::value, "");
   static_assert(std::is_trivially_destructible<V>::value, "");
@@ -163,7 +163,6 @@ void test_constexpr_copy_ctor_extension() {
   static_assert(test_constexpr_copy_ctor_extension_imp<0>(V(42l)), "");
   static_assert(test_constexpr_copy_ctor_extension_imp<0>(V(42l)), "");
   static_assert(test_constexpr_copy_ctor_extension_imp<1>(V(nullptr)), "");
   static_assert(test_constexpr_copy_ctor_extension_imp<1>(V(nullptr)), "");
   static_assert(test_constexpr_copy_ctor_extension_imp<2>(V(101)), "");
   static_assert(test_constexpr_copy_ctor_extension_imp<2>(V(101)), "");
-#endif
 }
 }
 
 
 int main() {
 int main() {

+ 1 - 2
test/std/utilities/variant/variant.variant/variant.ctor/move.pass.cpp

@@ -186,7 +186,7 @@ constexpr bool test_constexpr_ctor_extension_imp(
 }
 }
 
 
 void test_constexpr_move_ctor_extension() {
 void test_constexpr_move_ctor_extension() {
-#if defined(_LIBCPP_VER) || defined(_MSVC_STL_VER)
+  // NOTE: This test is for not yet standardized behavior.
   using V = std::variant<long, void*, const int>;
   using V = std::variant<long, void*, const int>;
 #ifdef TEST_WORKAROUND_C1XX_BROKEN_IS_TRIVIALLY_COPYABLE
 #ifdef TEST_WORKAROUND_C1XX_BROKEN_IS_TRIVIALLY_COPYABLE
   static_assert(std::is_trivially_destructible<V>::value, "");
   static_assert(std::is_trivially_destructible<V>::value, "");
@@ -201,7 +201,6 @@ void test_constexpr_move_ctor_extension() {
   static_assert(test_constexpr_ctor_extension_imp<0>(V(42l)), "");
   static_assert(test_constexpr_ctor_extension_imp<0>(V(42l)), "");
   static_assert(test_constexpr_ctor_extension_imp<1>(V(nullptr)), "");
   static_assert(test_constexpr_ctor_extension_imp<1>(V(nullptr)), "");
   static_assert(test_constexpr_ctor_extension_imp<2>(V(101)), "");
   static_assert(test_constexpr_ctor_extension_imp<2>(V(101)), "");
-#endif
 }
 }
 
 
 int main() {
 int main() {