diff options
Diffstat (limited to 'libcxx/test/algorithms')
| -rw-r--r-- | libcxx/test/algorithms/alg.nonmodifying/mismatch/mismatch.pass.cpp | 8 | ||||
| -rw-r--r-- | libcxx/test/algorithms/alg.nonmodifying/mismatch/mismatch_pred.pass.cpp | 8 |
2 files changed, 16 insertions, 0 deletions
diff --git a/libcxx/test/algorithms/alg.nonmodifying/mismatch/mismatch.pass.cpp b/libcxx/test/algorithms/alg.nonmodifying/mismatch/mismatch.pass.cpp index fe678541382..78f795afae4 100644 --- a/libcxx/test/algorithms/alg.nonmodifying/mismatch/mismatch.pass.cpp +++ b/libcxx/test/algorithms/alg.nonmodifying/mismatch/mismatch.pass.cpp @@ -36,6 +36,14 @@ int main() input_iterator<const int*>(ia+3), input_iterator<const int*>(ib+3)))); + assert(std::mismatch(comma_iterator<const int*>(ia), + comma_iterator<const int*>(ia + sa), + comma_iterator<const int*>(ib)) == + (std::pair<comma_iterator<const int*>, + comma_iterator<const int*> >( + comma_iterator<const int*>(ia+3), + comma_iterator<const int*>(ib+3)))); + #ifdef HAS_FOUR_ITERATOR_VERSION assert(std::mismatch(input_iterator<const int*>(ia), input_iterator<const int*>(ia + sa), diff --git a/libcxx/test/algorithms/alg.nonmodifying/mismatch/mismatch_pred.pass.cpp b/libcxx/test/algorithms/alg.nonmodifying/mismatch/mismatch_pred.pass.cpp index 202a1b7bcb6..aeb74104bb4 100644 --- a/libcxx/test/algorithms/alg.nonmodifying/mismatch/mismatch_pred.pass.cpp +++ b/libcxx/test/algorithms/alg.nonmodifying/mismatch/mismatch_pred.pass.cpp @@ -39,6 +39,14 @@ int main() input_iterator<const int*> >( input_iterator<const int*>(ia+3), input_iterator<const int*>(ib+3)))); + assert(std::mismatch(comma_iterator<const int*>(ia), + comma_iterator<const int*>(ia + sa), + comma_iterator<const int*>(ib), + std::equal_to<int>()) == + (std::pair<comma_iterator<const int*>, + comma_iterator<const int*> >( + comma_iterator<const int*>(ia+3), + comma_iterator<const int*>(ib+3)))); #ifdef HAS_FOUR_ITERATOR_VERSION assert(std::mismatch(input_iterator<const int*>(ia), input_iterator<const int*>(ia + sa), |

