This revision was automatically updated to reflect the committed changes.
Closed by commit rL336030: [CUDA] Add tests that, in C++14 mode, min/max are 
constexpr. (authored by jlebar, committed by ).

Repository:
  rL LLVM

https://reviews.llvm.org/D48152

Files:
  test-suite/trunk/External/CUDA/algorithm.cu


Index: test-suite/trunk/External/CUDA/algorithm.cu
===================================================================
--- test-suite/trunk/External/CUDA/algorithm.cu
+++ test-suite/trunk/External/CUDA/algorithm.cu
@@ -42,6 +42,8 @@
   assert(std::minmax(1, 0).second == 1);
   assert(std::minmax({0, 10, -10, 100}, std::less<int>()).first == -10);
   assert(std::minmax({0, 10, -10, 100}, std::less<int>()).second == 100);
+  constexpr auto min = std::min(1, 2);
+  constexpr auto max = std::max(1, 2);
 #endif
 }
 
@@ -56,6 +58,8 @@
   assert(std::minmax(1, 0).second == 1);
   assert(std::minmax({0, 10, -10, 100}, std::less<int>()).first == -10);
   assert(std::minmax({0, 10, -10, 100}, std::less<int>()).second == 100);
+  constexpr auto min = std::min(1, 2);
+  constexpr auto max = std::max(1, 2);
 #endif
 }
 


Index: test-suite/trunk/External/CUDA/algorithm.cu
===================================================================
--- test-suite/trunk/External/CUDA/algorithm.cu
+++ test-suite/trunk/External/CUDA/algorithm.cu
@@ -42,6 +42,8 @@
   assert(std::minmax(1, 0).second == 1);
   assert(std::minmax({0, 10, -10, 100}, std::less<int>()).first == -10);
   assert(std::minmax({0, 10, -10, 100}, std::less<int>()).second == 100);
+  constexpr auto min = std::min(1, 2);
+  constexpr auto max = std::max(1, 2);
 #endif
 }
 
@@ -56,6 +58,8 @@
   assert(std::minmax(1, 0).second == 1);
   assert(std::minmax({0, 10, -10, 100}, std::less<int>()).first == -10);
   assert(std::minmax({0, 10, -10, 100}, std::less<int>()).second == 100);
+  constexpr auto min = std::min(1, 2);
+  constexpr auto max = std::max(1, 2);
 #endif
 }
 
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to