Add a test with an empty input range - should do nothing
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@305268 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -122,6 +122,12 @@ void basic_tests()
|
|||||||
assert(v[i] == 40 + triangle(i));
|
assert(v[i] == 40 + triangle(i));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
std::vector<int> v, res;
|
||||||
|
std::transform_exclusive_scan(v.begin(), v.end(), std::back_inserter(res), 40, std::plus<>(), identity<>());
|
||||||
|
assert(res.empty());
|
||||||
|
}
|
||||||
|
|
||||||
// Make sure that the calculations are done using the init typedef
|
// Make sure that the calculations are done using the init typedef
|
||||||
{
|
{
|
||||||
std::vector<unsigned char> v(10);
|
std::vector<unsigned char> v(10);
|
||||||
|
|||||||
Reference in New Issue
Block a user