mirror of
https://github.com/llvm-mirror/libcxx.git
synced 2025-10-23 18:38:30 +08:00
[libcxx] [test] Strip trailing whitespace. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@305848 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -14,8 +14,8 @@
|
||||
// class BinaryOperation, class UnaryOperation>
|
||||
// T transform_reduce(InputIterator1 first1, InputIterator1 last1,
|
||||
// T init, BinaryOperation binary_op, UnaryOperation unary_op);
|
||||
//
|
||||
|
||||
//
|
||||
|
||||
#include <numeric>
|
||||
#include <cassert>
|
||||
|
||||
@@ -58,7 +58,7 @@ template <class Iter1, class T, class BOp, class UOp>
|
||||
void
|
||||
test(Iter1 first1, Iter1 last1, T init, BOp bOp, UOp uOp, T x)
|
||||
{
|
||||
static_assert( std::is_same_v<T,
|
||||
static_assert( std::is_same_v<T,
|
||||
decltype(std::transform_reduce(first1, last1, init, bOp, uOp))> );
|
||||
assert(std::transform_reduce(first1, last1, init, bOp, uOp) == x);
|
||||
}
|
||||
@@ -93,7 +93,7 @@ template <typename T, typename Init>
|
||||
void test_return_type()
|
||||
{
|
||||
T *p = nullptr;
|
||||
static_assert( std::is_same_v<Init,
|
||||
static_assert( std::is_same_v<Init,
|
||||
decltype(std::transform_reduce(p, p, Init{}, std::plus<>(), identity<>()))> );
|
||||
}
|
||||
|
||||
|
@@ -24,7 +24,7 @@ template <class Iter1, class Iter2, class T>
|
||||
void
|
||||
test(Iter1 first1, Iter1 last1, Iter2 first2, T init, T x)
|
||||
{
|
||||
static_assert( std::is_same_v<T,
|
||||
static_assert( std::is_same_v<T,
|
||||
decltype(std::transform_reduce(first1, last1, first2, init))> );
|
||||
assert(std::transform_reduce(first1, last1, first2, init) == x);
|
||||
}
|
||||
@@ -52,7 +52,7 @@ template <typename T, typename Init>
|
||||
void test_return_type()
|
||||
{
|
||||
T *p = nullptr;
|
||||
static_assert( std::is_same_v<Init,
|
||||
static_assert( std::is_same_v<Init,
|
||||
decltype(std::transform_reduce(p, p, p, Init{}))> );
|
||||
}
|
||||
|
||||
|
@@ -15,8 +15,8 @@
|
||||
// T transform_reduce(InputIterator1 first1, InputIterator1 last1,
|
||||
// InputIterator2 first2, T init,
|
||||
// BinaryOperation1 binary_op1, BinaryOperation2 binary_op2);
|
||||
//
|
||||
|
||||
//
|
||||
|
||||
#include <numeric>
|
||||
#include <cassert>
|
||||
|
||||
@@ -26,7 +26,7 @@ template <class Iter1, class Iter2, class T, class Op1, class Op2>
|
||||
void
|
||||
test(Iter1 first1, Iter1 last1, Iter2 first2, T init, Op1 op1, Op2 op2, T x)
|
||||
{
|
||||
static_assert( std::is_same_v<T,
|
||||
static_assert( std::is_same_v<T,
|
||||
decltype(std::transform_reduce(first1, last1, first2, init, op1, op2))> );
|
||||
assert(std::transform_reduce(first1, last1, first2, init, op1, op2) == x);
|
||||
}
|
||||
@@ -54,7 +54,7 @@ template <typename T, typename Init>
|
||||
void test_return_type()
|
||||
{
|
||||
T *p = nullptr;
|
||||
static_assert( std::is_same_v<Init,
|
||||
static_assert( std::is_same_v<Init,
|
||||
decltype(std::transform_reduce(p, p, p, Init{}, std::plus<>(), std::multiplies<>()))> );
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user