aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3
diff options
context:
space:
mode:
authorPaolo Carlini <paolo.carlini@oracle.com>2011-01-14 17:17:32 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2011-01-14 17:17:32 +0000
commita5983012cd0ec977773c42ba8ae80b021cd2935f (patch)
tree0089bb7e81e2d942ef48539496a355b0ee99af78 /libstdc++-v3
parentbb127cd84ba16c439cf3d5783f5e112cdfb4693b (diff)
downloadgcc-a5983012cd0ec977773c42ba8ae80b021cd2935f.zip
gcc-a5983012cd0ec977773c42ba8ae80b021cd2935f.tar.gz
gcc-a5983012cd0ec977773c42ba8ae80b021cd2935f.tar.bz2
check_type.cc: Minor tweaks.
2011-01-14 Paolo Carlini <paolo.carlini@oracle.com> * testsuite/25_algorithms/is_permutation/check_type.cc: Minor tweaks. * testsuite/25_algorithms/is_permutation/1.cc: Cosmetic changes. From-SVN: r168796
Diffstat (limited to 'libstdc++-v3')
-rw-r--r--libstdc++-v3/ChangeLog6
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/is_permutation/1.cc14
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/is_permutation/check_type.cc17
3 files changed, 22 insertions, 15 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 33c7f73..cd122ad 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,9 @@
+2011-01-14 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * testsuite/25_algorithms/is_permutation/check_type.cc: Minor
+ tweaks.
+ * testsuite/25_algorithms/is_permutation/1.cc: Cosmetic changes.
+
2011-01-13 Paolo Carlini <paolo.carlini@oracle.com>
* testsuite/25_algorithms/is_permutation/check_type.cc: New.
diff --git a/libstdc++-v3/testsuite/25_algorithms/is_permutation/1.cc b/libstdc++-v3/testsuite/25_algorithms/is_permutation/1.cc
index 264cb13..1ae227f 100644
--- a/libstdc++-v3/testsuite/25_algorithms/is_permutation/1.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/is_permutation/1.cc
@@ -76,25 +76,25 @@ void test01()
do_test(arr6, std::equal_to<int>(), false);
int arr7[] = { 1, 2, 3, 4, 5 };
- do_test(arr7, my_equal_to());
+ do_test(arr7, my_equal_to());
int arr8[] = { 1, 3, 3, 4, 5 };
- do_test(arr8, my_equal_to(), false);
+ do_test(arr8, my_equal_to(), false);
int arr9[] = { 3, 3, 3, 4, 4 };
- do_test(arr9, my_equal_to(), false);
+ do_test(arr9, my_equal_to(), false);
int arr10[] = { 111, 222, 333, 444, 555 };
- do_test(arr10, my_equal_to());
+ do_test(arr10, my_equal_to());
int arr11[] = { 1, 222, 33, 4, 55 };
- do_test(arr11, my_equal_to());
+ do_test(arr11, my_equal_to());
int arr12[] = { 111, 333, 333, 444, 555 };
- do_test(arr12, my_equal_to(), false);
+ do_test(arr12, my_equal_to(), false);
int arr13[] = { 333, 333, 333, 444, 444 };
- do_test(arr13, my_equal_to(), false);
+ do_test(arr13, my_equal_to(), false);
}
int main()
diff --git a/libstdc++-v3/testsuite/25_algorithms/is_permutation/check_type.cc b/libstdc++-v3/testsuite/25_algorithms/is_permutation/check_type.cc
index fe4ec1f..600c09d 100644
--- a/libstdc++-v3/testsuite/25_algorithms/is_permutation/check_type.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/is_permutation/check_type.cc
@@ -29,20 +29,21 @@
using __gnu_test::forward_iterator_wrapper;
struct X { };
-
bool operator==(const X&, const X) { return true; }
-bool predicate(const X&, const X&) { return true; }
+
+struct Y { };
+bool predicate(const Y&, const Y&) { return true; }
bool
-test1(forward_iterator_wrapper<X>& lhs1,
- forward_iterator_wrapper<X>& rhs1)
+test1(forward_iterator_wrapper<X>& x1,
+ forward_iterator_wrapper<X>& x2)
{
- return std::is_permutation(lhs1, lhs1, rhs1);
+ return std::is_permutation(x1, x1, x2);
}
bool
-test2(forward_iterator_wrapper<X>& x1,
- forward_iterator_wrapper<X>& x2)
+test2(forward_iterator_wrapper<Y>& y1,
+ forward_iterator_wrapper<Y>& y2)
{
- return std::is_permutation(x1, x1, x2, predicate);
+ return std::is_permutation(y1, y1, y2, predicate);
}