[PATCH] D56662: The test coverage extension: the other order of includes of the key headers

Mikhail Dvorskiy via Phabricator reviews at reviews.llvm.org
Mon Jan 14 05:43:42 PST 2019


MikeDvorskiy created this revision.
MikeDvorskiy added reviewers: rodgert, ldionne.
MikeDvorskiy created this object with visibility "All Users".
Herald added a subscriber: libcxx-commits.

The patch (changes) test a case when  'algorithm'(or/and 'numeric', 'memory') is(are) included before 'execution' header.


Repository:
  rPSTL pstl

https://reviews.llvm.org/D56662

Files:
  test/test_fill.cpp
  test/test_reduce.cpp
  test/test_rotate.cpp
  test/test_uninitialized_construct.cpp


Index: test/test_uninitialized_construct.cpp
===================================================================
--- test/test_uninitialized_construct.cpp
+++ test/test_uninitialized_construct.cpp
@@ -13,8 +13,9 @@
 
 #include "pstl_test_config.h"
 
+// including 'memory' before 'execution' to test the other order of header includes
+#include "pstl/memory"
 #include "pstl/execution"
-#include "pstl/memory"
 #include "utils.h"
 
 using namespace TestUtils;
Index: test/test_rotate.cpp
===================================================================
--- test/test_rotate.cpp
+++ test/test_rotate.cpp
@@ -113,7 +113,7 @@
     template <typename ExecutionPolicy, typename Iterator, typename Size>
     typename std::enable_if<
         is_same_iterator_category<Iterator, std::random_access_iterator_tag>::value &&
-            !std::is_same<ExecutionPolicy, pstl::execution::sequenced_policy>::value &&
+            !std::is_same<ExecutionPolicy, __pstl::execution::sequenced_policy>::value &&
             std::is_same<typename std::iterator_traits<Iterator>::value_type, wrapper<float32_t>>::value,
         bool>::type
     check_move(ExecutionPolicy&& exec, Iterator b, Iterator e, Size shift)
@@ -129,7 +129,7 @@
     template <typename ExecutionPolicy, typename Iterator, typename Size>
     typename std::enable_if<
         !(is_same_iterator_category<Iterator, std::random_access_iterator_tag>::value &&
-          !std::is_same<ExecutionPolicy, pstl::execution::sequenced_policy>::value &&
+          !std::is_same<ExecutionPolicy, __pstl::execution::sequenced_policy>::value &&
           std::is_same<typename std::iterator_traits<Iterator>::value_type, wrapper<float32_t>>::value),
         bool>::type
     check_move(ExecutionPolicy&& exec, Iterator b, Iterator e, Size shift)
Index: test/test_reduce.cpp
===================================================================
--- test/test_reduce.cpp
+++ test/test_reduce.cpp
@@ -10,8 +10,9 @@
 
 #include "pstl_test_config.h"
 
+// including 'numeric' before 'execution' to test the other order of header includes
+#include "pstl/numeric"
 #include "pstl/execution"
-#include "pstl/numeric"
 #include "utils.h"
 
 using namespace TestUtils;
Index: test/test_fill.cpp
===================================================================
--- test/test_fill.cpp
+++ test/test_fill.cpp
@@ -10,8 +10,10 @@
 
 // Tests for fill/fill_n
 
+// including 'algorithm' before 'execution' to test the other order of header includes
+#include "pstl/algorithm"
 #include "pstl/execution"
-#include "pstl/algorithm"
+
 #include "utils.h"
 
 using namespace TestUtils;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56662.181542.patch
Type: text/x-patch
Size: 2619 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20190114/345e4166/attachment.bin>


More information about the libcxx-commits mailing list