diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2019-08-20 18:01:01 +0000 | 
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2019-08-20 18:01:01 +0000 | 
| commit | b7332b04df5d50c92640c74cfeb138ecb7e3f7ae (patch) | |
| tree | b1b49faa0cab1482905e0cda6f0ee5d97e3fe08f /test/std/algorithms/alg.modifying.operations/alg.reverse/reverse.pass.cpp | |
| parent | 6012fe9abb1f01b1b5b4ca908464804c21ff8602 (diff) | |
Notes
Diffstat (limited to 'test/std/algorithms/alg.modifying.operations/alg.reverse/reverse.pass.cpp')
| -rw-r--r-- | test/std/algorithms/alg.modifying.operations/alg.reverse/reverse.pass.cpp | 60 | 
1 files changed, 0 insertions, 60 deletions
diff --git a/test/std/algorithms/alg.modifying.operations/alg.reverse/reverse.pass.cpp b/test/std/algorithms/alg.modifying.operations/alg.reverse/reverse.pass.cpp deleted file mode 100644 index 6c49605b66169..0000000000000 --- a/test/std/algorithms/alg.modifying.operations/alg.reverse/reverse.pass.cpp +++ /dev/null @@ -1,60 +0,0 @@ -//===----------------------------------------------------------------------===// -// -//                     The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// <algorithm> - -// template<BidirectionalIterator Iter> -//   requires HasSwap<Iter::reference, Iter::reference> -//   void -//   reverse(Iter first, Iter last); - -#include <algorithm> -#include <cassert> - -#include "test_iterators.h" - -template <class Iter> -void -test() -{ -    int ia[] = {0}; -    const unsigned sa = sizeof(ia)/sizeof(ia[0]); -    std::reverse(Iter(ia), Iter(ia)); -    assert(ia[0] == 0); -    std::reverse(Iter(ia), Iter(ia+sa)); -    assert(ia[0] == 0); - -    int ib[] = {0, 1}; -    const unsigned sb = sizeof(ib)/sizeof(ib[0]); -    std::reverse(Iter(ib), Iter(ib+sb)); -    assert(ib[0] == 1); -    assert(ib[1] == 0); - -    int ic[] = {0, 1, 2}; -    const unsigned sc = sizeof(ic)/sizeof(ic[0]); -    std::reverse(Iter(ic), Iter(ic+sc)); -    assert(ic[0] == 2); -    assert(ic[1] == 1); -    assert(ic[2] == 0); - -    int id[] = {0, 1, 2, 3}; -    const unsigned sd = sizeof(id)/sizeof(id[0]); -    std::reverse(Iter(id), Iter(id+sd)); -    assert(id[0] == 3); -    assert(id[1] == 2); -    assert(id[2] == 1); -    assert(id[3] == 0); -} - -int main() -{ -    test<bidirectional_iterator<int*> >(); -    test<random_access_iterator<int*> >(); -    test<int*>(); -}  | 
