diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2017-04-20 21:21:10 +0000 | 
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2017-04-20 21:21:10 +0000 | 
| commit | 1c3313bd0215c89fb38710a1ea0762ccf32e859c (patch) | |
| tree | 65e6d33ca6254b41a8f4230edff47c5344dbd019 /test/std/algorithms/alg.modifying.operations | |
| parent | 0dc0969cd0a732760f0aa79942a04e0eaef297c4 (diff) | |
Notes
Diffstat (limited to 'test/std/algorithms/alg.modifying.operations')
8 files changed, 36 insertions, 67 deletions
diff --git a/test/std/algorithms/alg.modifying.operations/alg.move/move.pass.cpp b/test/std/algorithms/alg.modifying.operations/alg.move/move.pass.cpp index 9a954d934c4e..0c1cc15445f7 100644 --- a/test/std/algorithms/alg.modifying.operations/alg.move/move.pass.cpp +++ b/test/std/algorithms/alg.modifying.operations/alg.move/move.pass.cpp @@ -16,10 +16,9 @@  #include <algorithm>  #include <cassert> -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES  #include <memory> -#endif +#include "test_macros.h"  #include "test_iterators.h"  template <class InIter, class OutIter> @@ -38,8 +37,7 @@ test()          assert(ia[i] == ib[i]);  } -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - +#if TEST_STD_VER >= 11  template <class InIter, class OutIter>  void  test1() @@ -55,8 +53,7 @@ test1()      for (unsigned i = 0; i < N; ++i)          assert(*ib[i] == static_cast<int>(i));  } - -#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif  int main()  { @@ -95,7 +92,7 @@ int main()      test<const int*, random_access_iterator<int*> >();      test<const int*, int*>(); -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#if TEST_STD_VER >= 11      test1<input_iterator<std::unique_ptr<int>*>, output_iterator<std::unique_ptr<int>*> >();      test1<input_iterator<std::unique_ptr<int>*>, input_iterator<std::unique_ptr<int>*> >();      test1<input_iterator<std::unique_ptr<int>*>, forward_iterator<std::unique_ptr<int>*> >(); @@ -130,5 +127,5 @@ int main()      test1<std::unique_ptr<int>*, bidirectional_iterator<std::unique_ptr<int>*> >();      test1<std::unique_ptr<int>*, random_access_iterator<std::unique_ptr<int>*> >();      test1<std::unique_ptr<int>*, std::unique_ptr<int>*>(); -#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // TEST_STD_VER >= 11  } diff --git a/test/std/algorithms/alg.modifying.operations/alg.move/move_backward.pass.cpp b/test/std/algorithms/alg.modifying.operations/alg.move/move_backward.pass.cpp index c5f9d3ac7b6b..9b3df5af4324 100644 --- a/test/std/algorithms/alg.modifying.operations/alg.move/move_backward.pass.cpp +++ b/test/std/algorithms/alg.modifying.operations/alg.move/move_backward.pass.cpp @@ -16,10 +16,9 @@  #include <algorithm>  #include <cassert> -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES  #include <memory> -#endif +#include "test_macros.h"  #include "test_iterators.h"  template <class InIter, class OutIter> @@ -38,8 +37,7 @@ test()          assert(ia[i] == ib[i]);  } -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - +#if TEST_STD_VER >= 11  template <class InIter, class OutIter>  void  test1() @@ -55,8 +53,7 @@ test1()      for (unsigned i = 0; i < N; ++i)          assert(*ib[i] == static_cast<int>(i));  } - -#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif  int main()  { @@ -72,7 +69,7 @@ int main()      test<const int*, random_access_iterator<int*> >();      test<const int*, int*>(); -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#if TEST_STD_VER >= 11      test1<bidirectional_iterator<std::unique_ptr<int>*>, bidirectional_iterator<std::unique_ptr<int>*> >();      test1<bidirectional_iterator<std::unique_ptr<int>*>, random_access_iterator<std::unique_ptr<int>*> >();      test1<bidirectional_iterator<std::unique_ptr<int>*>, std::unique_ptr<int>*>(); @@ -84,5 +81,5 @@ int main()      test1<std::unique_ptr<int>*, bidirectional_iterator<std::unique_ptr<int>*> >();      test1<std::unique_ptr<int>*, random_access_iterator<std::unique_ptr<int>*> >();      test1<std::unique_ptr<int>*, std::unique_ptr<int>*>(); -#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // TEST_STD_VER >= 11  } diff --git a/test/std/algorithms/alg.modifying.operations/alg.partitions/partition.pass.cpp b/test/std/algorithms/alg.modifying.operations/alg.partitions/partition.pass.cpp index 8eddfbc4d048..ce74684f3c96 100644 --- a/test/std/algorithms/alg.modifying.operations/alg.partitions/partition.pass.cpp +++ b/test/std/algorithms/alg.modifying.operations/alg.partitions/partition.pass.cpp @@ -17,9 +17,7 @@  #include <algorithm>  #include <cassert> -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES -#include <memory> -#endif +  #include "test_iterators.h" diff --git a/test/std/algorithms/alg.modifying.operations/alg.remove/remove.pass.cpp b/test/std/algorithms/alg.modifying.operations/alg.remove/remove.pass.cpp index 80f86568c4d9..a77a9eddb191 100644 --- a/test/std/algorithms/alg.modifying.operations/alg.remove/remove.pass.cpp +++ b/test/std/algorithms/alg.modifying.operations/alg.remove/remove.pass.cpp @@ -17,10 +17,9 @@  #include <algorithm>  #include <cassert> -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES  #include <memory> -#endif +#include "test_macros.h"  #include "test_iterators.h"  template <class Iter> @@ -39,8 +38,7 @@ test()      assert(ia[5] == 4);  } -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - +#if TEST_STD_VER >= 11  template <class Iter>  void  test1() @@ -62,8 +60,7 @@ test1()      assert(*ia[4] == 3);      assert(*ia[5] == 4);  } - -#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // TEST_STD_VER >= 11  int main()  { @@ -72,12 +69,10 @@ int main()      test<random_access_iterator<int*> >();      test<int*>(); -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - +#if TEST_STD_VER >= 11      test1<forward_iterator<std::unique_ptr<int>*> >();      test1<bidirectional_iterator<std::unique_ptr<int>*> >();      test1<random_access_iterator<std::unique_ptr<int>*> >();      test1<std::unique_ptr<int>*>(); - -#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // TEST_STD_VER >= 11  } diff --git a/test/std/algorithms/alg.modifying.operations/alg.remove/remove_if.pass.cpp b/test/std/algorithms/alg.modifying.operations/alg.remove/remove_if.pass.cpp index b234431295a4..c40f3e727836 100644 --- a/test/std/algorithms/alg.modifying.operations/alg.remove/remove_if.pass.cpp +++ b/test/std/algorithms/alg.modifying.operations/alg.remove/remove_if.pass.cpp @@ -18,10 +18,9 @@  #include <algorithm>  #include <functional>  #include <cassert> -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES  #include <memory> -#endif +#include "test_macros.h"  #include "test_iterators.h"  #include "counting_predicates.hpp" @@ -46,8 +45,7 @@ test()      assert(cp.count() == sa);  } -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - +#if TEST_STD_VER >= 11  struct pred  {      bool operator()(const std::unique_ptr<int>& i) {return *i == 2;} @@ -77,8 +75,7 @@ test1()      assert(*ia[4] == 3);      assert(*ia[5] == 4);  } - -#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // TEST_STD_VER >= 11  int main()  { @@ -87,12 +84,10 @@ int main()      test<random_access_iterator<int*> >();      test<int*>(); -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - +#if TEST_STD_VER >= 11      test1<forward_iterator<std::unique_ptr<int>*> >();      test1<bidirectional_iterator<std::unique_ptr<int>*> >();      test1<random_access_iterator<std::unique_ptr<int>*> >();      test1<std::unique_ptr<int>*>(); - -#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // TEST_STD_VER >= 11  } diff --git a/test/std/algorithms/alg.modifying.operations/alg.swap/swap_ranges.pass.cpp b/test/std/algorithms/alg.modifying.operations/alg.swap/swap_ranges.pass.cpp index 64a5a6a5a064..84f2c8c9f11d 100644 --- a/test/std/algorithms/alg.modifying.operations/alg.swap/swap_ranges.pass.cpp +++ b/test/std/algorithms/alg.modifying.operations/alg.swap/swap_ranges.pass.cpp @@ -16,10 +16,9 @@  #include <algorithm>  #include <cassert> -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES  #include <memory> -#endif +#include "test_macros.h"  #include "test_iterators.h"  template<class Iter1, class Iter2> @@ -38,8 +37,7 @@ test()      assert(j[2] == 3);  } -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - +#if TEST_STD_VER >= 11  template<class Iter1, class Iter2>  void  test1() @@ -59,8 +57,7 @@ test1()      assert(*j[1] == 2);      assert(*j[2] == 3);  } - -#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // TEST_STD_VER >= 11  void test2()  { @@ -131,8 +128,7 @@ int main()      test<int*, random_access_iterator<int*> >();      test<int*, int*>(); -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - +#if TEST_STD_VER >= 11      test1<forward_iterator<std::unique_ptr<int>*>, forward_iterator<std::unique_ptr<int>*> >();      test1<forward_iterator<std::unique_ptr<int>*>, bidirectional_iterator<std::unique_ptr<int>*> >();      test1<forward_iterator<std::unique_ptr<int>*>, random_access_iterator<std::unique_ptr<int>*> >(); @@ -152,8 +148,7 @@ int main()      test1<std::unique_ptr<int>*, bidirectional_iterator<std::unique_ptr<int>*> >();      test1<std::unique_ptr<int>*, random_access_iterator<std::unique_ptr<int>*> >();      test1<std::unique_ptr<int>*, std::unique_ptr<int>*>(); - -#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // TEST_STD_VER >= 11      test2();  } diff --git a/test/std/algorithms/alg.modifying.operations/alg.unique/unique.pass.cpp b/test/std/algorithms/alg.modifying.operations/alg.unique/unique.pass.cpp index ab4ffad60f9e..049ccfe9871a 100644 --- a/test/std/algorithms/alg.modifying.operations/alg.unique/unique.pass.cpp +++ b/test/std/algorithms/alg.modifying.operations/alg.unique/unique.pass.cpp @@ -17,10 +17,9 @@  #include <algorithm>  #include <cassert> -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES  #include <memory> -#endif +#include "test_macros.h"  #include "test_iterators.h"  template <class Iter> @@ -84,7 +83,7 @@ test()      assert(ii[2] == 2);  } -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#if TEST_STD_VER >= 11  struct do_nothing  { @@ -168,8 +167,7 @@ test1()      assert(*ii[1] == 1);      assert(*ii[2] == 2);  } - -#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // TEST_STD_VER >= 11  int main()  { @@ -178,12 +176,10 @@ int main()      test<random_access_iterator<int*> >();      test<int*>(); -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - +#if TEST_STD_VER >= 11      test1<forward_iterator<Ptr*> >();      test1<bidirectional_iterator<Ptr*> >();      test1<random_access_iterator<Ptr*> >();      test1<Ptr*>(); - -#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif  } diff --git a/test/std/algorithms/alg.modifying.operations/alg.unique/unique_pred.pass.cpp b/test/std/algorithms/alg.modifying.operations/alg.unique/unique_pred.pass.cpp index c6df235bed6d..1640052058c7 100644 --- a/test/std/algorithms/alg.modifying.operations/alg.unique/unique_pred.pass.cpp +++ b/test/std/algorithms/alg.modifying.operations/alg.unique/unique_pred.pass.cpp @@ -17,10 +17,9 @@  #include <algorithm>  #include <cassert> -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES  #include <memory> -#endif +#include "test_macros.h"  #include "test_iterators.h"  struct count_equal @@ -110,7 +109,7 @@ test()      assert(count_equal::count == si-1);  } -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#if TEST_STD_VER >= 11  struct do_nothing  { @@ -210,8 +209,7 @@ test1()      assert(*ii[2] == 2);      assert(count_equal::count == si-1);  } - -#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // TEST_STD_VER >= 11  int main()  { @@ -220,12 +218,10 @@ int main()      test<random_access_iterator<int*> >();      test<int*>(); -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - +#if TEST_STD_VER >= 11      test1<forward_iterator<Ptr*> >();      test1<bidirectional_iterator<Ptr*> >();      test1<random_access_iterator<Ptr*> >();      test1<Ptr*>(); - -#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif  }  | 
