diff options
author | Marshall Clow <mclow.lists@gmail.com> | 2017-06-13 02:28:40 +0000 |
---|---|---|
committer | Marshall Clow <mclow.lists@gmail.com> | 2017-06-13 02:28:40 +0000 |
commit | ba2b6c6faea609e42ddba5e391b7e2fb1a688775 (patch) | |
tree | f344e62a526a7ea09f031f78e62629b1ebb1a8c0 /libcxx/test/std/numerics | |
parent | 6d0f39476ab4b5cd3230bb12837799da6a87e5cb (diff) | |
download | bcm5719-llvm-ba2b6c6faea609e42ddba5e391b7e2fb1a688775.tar.gz bcm5719-llvm-ba2b6c6faea609e42ddba5e391b7e2fb1a688775.zip |
Add a test with an empty input range - should do nothing
llvm-svn: 305268
Diffstat (limited to 'libcxx/test/std/numerics')
-rw-r--r-- | libcxx/test/std/numerics/numeric.ops/transform.exclusive.scan/transform_exclusive_scan_iter_iter_iter_init_bop_uop.pass.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libcxx/test/std/numerics/numeric.ops/transform.exclusive.scan/transform_exclusive_scan_iter_iter_iter_init_bop_uop.pass.cpp b/libcxx/test/std/numerics/numeric.ops/transform.exclusive.scan/transform_exclusive_scan_iter_iter_iter_init_bop_uop.pass.cpp index 3bfb336a03f..2370e9ea913 100644 --- a/libcxx/test/std/numerics/numeric.ops/transform.exclusive.scan/transform_exclusive_scan_iter_iter_iter_init_bop_uop.pass.cpp +++ b/libcxx/test/std/numerics/numeric.ops/transform.exclusive.scan/transform_exclusive_scan_iter_iter_iter_init_bop_uop.pass.cpp @@ -122,6 +122,12 @@ void basic_tests() 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 { std::vector<unsigned char> v(10); |