[libcxx] r336618 - [test] two small cleanups:

Casey Carter via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 9 16:45:10 PDT 2018


Author: caseycarter
Date: Mon Jul  9 16:45:09 2018
New Revision: 336618

URL: http://llvm.org/viewvc/llvm-project?rev=336618&view=rev
Log:
[test] two small cleanups:

* Remove unused type from is_assignable.pass.cpp

* Don't specialize `common_type<::X<float>>` in common_type.pass.cpp, which violates the requirements of [meta.trans.other]/5

Modified:
    libcxx/trunk/test/std/utilities/meta/meta.trans/meta.trans.other/common_type.pass.cpp
    libcxx/trunk/test/std/utilities/meta/meta.unary/meta.unary.prop/is_assignable.pass.cpp

Modified: libcxx/trunk/test/std/utilities/meta/meta.trans/meta.trans.other/common_type.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/meta/meta.trans/meta.trans.other/common_type.pass.cpp?rev=336618&r1=336617&r2=336618&view=diff
==============================================================================
--- libcxx/trunk/test/std/utilities/meta/meta.trans/meta.trans.other/common_type.pass.cpp (original)
+++ libcxx/trunk/test/std/utilities/meta/meta.trans/meta.trans.other/common_type.pass.cpp Mon Jul  9 16:45:09 2018
@@ -11,8 +11,9 @@
 
 // common_type
 
-#include <type_traits>
+#include <functional>
 #include <memory>
+#include <type_traits>
 
 #include "test_macros.h"
 
@@ -45,7 +46,6 @@ namespace std
 
     template <> struct common_type< ::S<long>, long> {};
     template <> struct common_type<long, ::S<long> > {};
-    template <> struct common_type< ::X<float> > {};
     template <> struct common_type< ::X<double>, ::X<double> > {};
 }
 
@@ -97,7 +97,6 @@ void test_bullet_two() {
   static_assert(std::is_same<CommonType<int volatile[]>, int volatile*>::value, "");
   static_assert(std::is_same<CommonType<void(&)()>, void(*)()>::value, "");
 
-  static_assert(no_common_type<X<float> >::value, "");
   static_assert(no_common_type<X<double> >::value, "");
 }
 

Modified: libcxx/trunk/test/std/utilities/meta/meta.unary/meta.unary.prop/is_assignable.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/meta/meta.unary/meta.unary.prop/is_assignable.pass.cpp?rev=336618&r1=336617&r2=336618&view=diff
==============================================================================
--- libcxx/trunk/test/std/utilities/meta/meta.unary/meta.unary.prop/is_assignable.pass.cpp (original)
+++ libcxx/trunk/test/std/utilities/meta/meta.unary/meta.unary.prop/is_assignable.pass.cpp Mon Jul  9 16:45:09 2018
@@ -59,8 +59,6 @@ struct E
 template <typename T>
 struct X { T t; };
 
-struct Incomplete;
-
 int main()
 {
     test_is_assignable<int&, int&> ();




More information about the cfe-commits mailing list