aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/testsuite
diff options
context:
space:
mode:
authorPaolo Carlini <pcarlini@suse.de>2006-04-10 10:05:51 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2006-04-10 10:05:51 +0000
commit9f889fcf528e9c42a0c17c8bc63afe89f749f786 (patch)
tree5b60683799d029dd82b0d0e77535ce75aa2c309d /libstdc++-v3/testsuite
parentcf26aa89100a9340eaae73c3beee6dd791cb7777 (diff)
downloadgcc-9f889fcf528e9c42a0c17c8bc63afe89f749f786.zip
gcc-9f889fcf528e9c42a0c17c8bc63afe89f749f786.tar.gz
gcc-9f889fcf528e9c42a0c17c8bc63afe89f749f786.tar.bz2
DR 538, [Ready]
2006-04-10 Paolo Carlini <pcarlini@suse.de> DR 538, [Ready] * include/bits/stl_algo.h (__unique_copy(,,, input_iterator_tag, output_iterator_tag), and predicated counterpart): Revert to the algorithm pre-DR 241, i.e., value_type of InputIterator is now required to be Assignable too. * testsuite/25_algorithms/unique_copy/3.cc: Remove. * docs/html/ext/howto.html: Add an entry for DR 538. From-SVN: r112818
Diffstat (limited to 'libstdc++-v3/testsuite')
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/unique_copy/3.cc93
1 files changed, 0 insertions, 93 deletions
diff --git a/libstdc++-v3/testsuite/25_algorithms/unique_copy/3.cc b/libstdc++-v3/testsuite/25_algorithms/unique_copy/3.cc
deleted file mode 100644
index 2245821..0000000
--- a/libstdc++-v3/testsuite/25_algorithms/unique_copy/3.cc
+++ /dev/null
@@ -1,93 +0,0 @@
-// Copyright (C) 2006 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 25.2.8 [lib.alg.unique]
-
-#include <algorithm>
-#include <testsuite_hooks.h>
-#include <testsuite_iterators.h>
-
-using __gnu_test::test_container;
-using __gnu_test::input_iterator_wrapper;
-using __gnu_test::output_iterator_wrapper;
-using std::unique_copy;
-using std::equal_to;
-
-struct no_assign
-{
- int const x;
- no_assign() : x(23) { }
- no_assign(int val) : x(val) { }
- operator int() const { return x; }
-};
-
-typedef test_container<no_assign, input_iterator_wrapper> Icontainer;
-typedef test_container<int, output_iterator_wrapper> Ocontainer;
-
-no_assign array1[] = {0, 0, 0, 1, 1, 1};
-int array2[2];
-
-void
-test1()
-{
- bool test __attribute__((unused)) = true;
- Icontainer con1(array1, array1);
- Ocontainer con2(array2, array2);
- VERIFY( unique_copy(con1.begin(), con1.end(), con2.begin()).ptr == array2 );
-}
-
-void
-test2()
-{
- bool test __attribute__((unused)) = true;
- Icontainer con1(array1, array1 + 6);
- Ocontainer con2(array2, array2 + 2);
- VERIFY( unique_copy(con1.begin(), con1.end(), con2.begin()).ptr
- == array2 + 2 );
- VERIFY( array2[0] == 0 && array2[1] == 1 );
-}
-
-void
-test3()
-{
- bool test __attribute__((unused)) = true;
- Icontainer con1(array1, array1);
- Ocontainer con2(array2, array2);
- VERIFY( unique_copy(con1.begin(), con1.end(), con2.begin(),
- equal_to<int>()).ptr == array2 );
-}
-
-void
-test4()
-{
- bool test __attribute__((unused)) = true;
- Icontainer con1(array1, array1 + 6);
- Ocontainer con2(array2, array2 + 2);
- VERIFY( unique_copy(con1.begin(), con1.end(), con2.begin(),
- equal_to<int>()).ptr == array2 + 2 );
- VERIFY( array2[0] == 0 && array2[1] == 1 );
-}
-
-int
-main()
-{
- test1();
- test2();
- test3();
- test4();
-}