[libcxx] r288538 - Fix copy/paste errors in new variant tests

Eric Fiselier via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 2 13:32:35 PST 2016


Author: ericwf
Date: Fri Dec  2 15:32:35 2016
New Revision: 288538

URL: http://llvm.org/viewvc/llvm-project?rev=288538&view=rev
Log:
Fix copy/paste errors in new variant tests

Modified:
    libcxx/trunk/test/std/utilities/variant/variant.variant/variant.assign/copy.pass.cpp
    libcxx/trunk/test/std/utilities/variant/variant.variant/variant.assign/move.pass.cpp

Modified: libcxx/trunk/test/std/utilities/variant/variant.variant/variant.assign/copy.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/variant/variant.variant/variant.assign/copy.pass.cpp?rev=288538&r1=288537&r2=288538&view=diff
==============================================================================
--- libcxx/trunk/test/std/utilities/variant/variant.variant/variant.assign/copy.pass.cpp (original)
+++ libcxx/trunk/test/std/utilities/variant/variant.variant/variant.assign/copy.pass.cpp Fri Dec  2 15:32:35 2016
@@ -387,16 +387,16 @@ void test_copy_assignment_different_inde
 
 template <size_t NewIdx, class ValueType>
 constexpr bool test_constexpr_assign_extension_imp(
-    std::variant<long, void*, const int>&& v, ValueType&& new_value)
+    std::variant<long, void*, int>&& v, ValueType&& new_value)
 {
-  const std::variant<long, void*, const int> cp(
+  const std::variant<long, void*, int> cp(
       std::forward<ValueType>(new_value));
   v = cp;
   return v.index() == NewIdx &&
         std::get<NewIdx>(v) == std::get<NewIdx>(cp);
 }
 
-void test_constexpr_move_ctor_extension() {
+void test_constexpr_copy_assignment_extension() {
 #ifdef _LIBCPP_VERSION
   using V = std::variant<long, void*, int>;
   static_assert(std::is_trivially_copyable<V>::value, "");

Modified: libcxx/trunk/test/std/utilities/variant/variant.variant/variant.assign/move.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/variant/variant.variant/variant.assign/move.pass.cpp?rev=288538&r1=288537&r2=288538&view=diff
==============================================================================
--- libcxx/trunk/test/std/utilities/variant/variant.variant/variant.assign/move.pass.cpp (original)
+++ libcxx/trunk/test/std/utilities/variant/variant.variant/variant.assign/move.pass.cpp Fri Dec  2 15:32:35 2016
@@ -310,9 +310,9 @@ void test_move_assignment_different_inde
 
 template <size_t NewIdx, class ValueType>
 constexpr bool test_constexpr_assign_extension_imp(
-    std::variant<long, void*, const int>&& v, ValueType&& new_value)
+    std::variant<long, void*, int>&& v, ValueType&& new_value)
 {
-  std::variant<long, void*, const int> v2(
+  std::variant<long, void*, int> v2(
       std::forward<ValueType>(new_value));
   const auto cp = v2;
   v = std::move(v2);
@@ -320,7 +320,7 @@ constexpr bool test_constexpr_assign_ext
         std::get<NewIdx>(v) == std::get<NewIdx>(cp);
 }
 
-void test_constexpr_move_ctor_extension() {
+void test_constexpr_move_assignment_extension() {
 #ifdef _LIBCPP_VERSION
   using V = std::variant<long, void*, int>;
   static_assert(std::is_trivially_copyable<V>::value, "");




More information about the cfe-commits mailing list