[gcc(refs/users/ppalka/heads/libstdcxx-constrained-algos-adaptors)] Minor testsuite fixes
Patrick Palka
ppalka@gcc.gnu.org
Thu Feb 6 23:25:00 GMT 2020
https://gcc.gnu.org/g:f1dba9ba8b9ced5db4b73a5f47c253d1e131b989
commit f1dba9ba8b9ced5db4b73a5f47c253d1e131b989
Author: Patrick Palka <ppalka@redhat.com>
Date: Thu Feb 6 18:07:59 2020 -0500
Minor testsuite fixes
Diff:
---
libstdc++-v3/testsuite/std/ranges/adaptors/all.cc | 8 +++-----
libstdc++-v3/testsuite/std/ranges/adaptors/common.cc | 2 +-
libstdc++-v3/testsuite/std/ranges/adaptors/counted.cc | 2 +-
libstdc++-v3/testsuite/std/ranges/adaptors/elements.cc | 2 +-
libstdc++-v3/testsuite/std/ranges/adaptors/reverse.cc | 2 +-
libstdc++-v3/testsuite/std/ranges/adaptors/take.cc | 2 +-
6 files changed, 8 insertions(+), 10 deletions(-)
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/all.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/all.cc
index 7815475..577ce74 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/all.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/all.cc
@@ -61,27 +61,25 @@ test03()
auto even = [] (int i) { return i%2==0; };
auto odd = [] (int i) { return i%2==1; };
auto square = [] (int i) { return i*i; };
- int count = 0;
+ int sum = 0;
for (auto v : (ints
| (views::all
| (views::filter(even)
| (views::filter(odd) | views::all)))
| views::transform(square)))
- count++;
- return count == 0;
+ sum += v;
+ return sum == 0;
}
constexpr bool
test04()
{
- auto even = [] (int i) { return i%2==0; };
auto odd = [] (int i) { return i%2==1; };
auto square = [] (int i) { return i*i; };
auto increment = [] (int i) { return i+1; };
auto small = [] (int i) { return i<30; };
auto non_negative = [] (int i) { return i>=0; };
auto negative = [] (int i) { return i<0; };
- int count = 0;
return ranges::equal(views::iota(-5)
| views::drop_while(negative)
| views::take_while(non_negative)
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/common.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/common.cc
index d160054..b737968 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/common.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/common.cc
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2020 Free Software Foundation, Inc.
+// Copyright (C) 2020 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
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/counted.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/counted.cc
index c81a8a8..e81f906 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/counted.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/counted.cc
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2020 Free Software Foundation, Inc.
+// Copyright (C) 2020 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
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/elements.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/elements.cc
index 0c6ee4b..d846c4c 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/elements.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/elements.cc
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2020 Free Software Foundation, Inc.
+// Copyright (C) 2020 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
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/reverse.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/reverse.cc
index b3f2e7e..0c6acea 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/reverse.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/reverse.cc
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2020 Free Software Foundation, Inc.
+// Copyright (C) 2020 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
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/take.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/take.cc
index 32ea9fc..e2d2edb 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/take.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/take.cc
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2020 Free Software Foundation, Inc.
+// Copyright (C) 2020 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
More information about the Libstdc++-cvs
mailing list