public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r11-3869] libstdc++: Improve comments in std::string tests
@ 2020-10-14 11:53 Jonathan Wakely
0 siblings, 0 replies; only message in thread
From: Jonathan Wakely @ 2020-10-14 11:53 UTC (permalink / raw)
To: gcc-cvs, libstdc++-cvs
https://gcc.gnu.org/g:5e961dba46a84b5c4ba5086d05db6ff449d8682f
commit r11-3869-g5e961dba46a84b5c4ba5086d05db6ff449d8682f
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Wed Oct 14 12:07:31 2020 +0100
libstdc++: Improve comments in std::string tests
The COW std::string does support some features of C++11 allocators, just
not propagation. Change some comments in the tests to be more precise
about that.
libstdc++-v3/ChangeLog:
* testsuite/21_strings/basic_string/allocator/char/copy.cc: Make
comment more precise about what isn't supported by COW strings.
* testsuite/21_strings/basic_string/allocator/char/copy_assign.cc:
Likewise.
* testsuite/21_strings/basic_string/allocator/char/move.cc:
Likewise.
* testsuite/21_strings/basic_string/allocator/char/move_assign.cc:
Likewise.
* testsuite/21_strings/basic_string/allocator/char/noexcept.cc:
Likewise.
* testsuite/21_strings/basic_string/allocator/char/operator_plus.cc:
Likewise.
* testsuite/21_strings/basic_string/allocator/char/swap.cc:
Likewise.
* testsuite/21_strings/basic_string/allocator/wchar_t/copy.cc:
Likewise.
* testsuite/21_strings/basic_string/allocator/wchar_t/copy_assign.cc:
Likewise.
* testsuite/21_strings/basic_string/allocator/wchar_t/move.cc:
Likewise.
* testsuite/21_strings/basic_string/allocator/wchar_t/move_assign.cc:
Likewise.
* testsuite/21_strings/basic_string/allocator/wchar_t/noexcept.cc:
Likewise.
* testsuite/21_strings/basic_string/allocator/wchar_t/operator_plus.cc:
Likewise.
* testsuite/21_strings/basic_string/allocator/wchar_t/swap.cc:
Likewise.
Diff:
---
.../testsuite/21_strings/basic_string/allocator/char/copy.cc | 8 ++++----
.../21_strings/basic_string/allocator/char/copy_assign.cc | 8 ++++----
.../testsuite/21_strings/basic_string/allocator/char/move.cc | 2 +-
.../21_strings/basic_string/allocator/char/move_assign.cc | 8 ++++----
.../testsuite/21_strings/basic_string/allocator/char/noexcept.cc | 8 ++++----
.../21_strings/basic_string/allocator/char/operator_plus.cc | 2 +-
.../testsuite/21_strings/basic_string/allocator/char/swap.cc | 8 ++++----
.../testsuite/21_strings/basic_string/allocator/wchar_t/copy.cc | 8 ++++----
.../21_strings/basic_string/allocator/wchar_t/copy_assign.cc | 8 ++++----
.../testsuite/21_strings/basic_string/allocator/wchar_t/move.cc | 2 +-
.../21_strings/basic_string/allocator/wchar_t/move_assign.cc | 8 ++++----
.../21_strings/basic_string/allocator/wchar_t/noexcept.cc | 8 ++++----
.../21_strings/basic_string/allocator/wchar_t/operator_plus.cc | 2 +-
.../testsuite/21_strings/basic_string/allocator/wchar_t/swap.cc | 8 ++++----
14 files changed, 44 insertions(+), 44 deletions(-)
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/allocator/char/copy.cc b/libstdc++-v3/testsuite/21_strings/basic_string/allocator/char/copy.cc
index b5c9b5b5315..9972cfbdc46 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/allocator/char/copy.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/allocator/char/copy.cc
@@ -5,24 +5,24 @@
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, 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 COPYING3. If not see
// <http://www.gnu.org/licenses/>.
// { dg-do run { target c++11 } }
-// COW strings don't support C++11 allocators:
+// COW strings don't support C++11 allocator propagation:
// { dg-require-effective-target cxx11-abi }
#include <string>
#include <testsuite_hooks.h>
#include <testsuite_allocator.h>
-
+
using C = char;
const C c = 'a';
using traits = std::char_traits<C>;
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/allocator/char/copy_assign.cc b/libstdc++-v3/testsuite/21_strings/basic_string/allocator/char/copy_assign.cc
index e776f37542b..038af4d8e05 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/allocator/char/copy_assign.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/allocator/char/copy_assign.cc
@@ -5,25 +5,25 @@
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, 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 COPYING3. If not see
// <http://www.gnu.org/licenses/>.
// { dg-do run { target c++11 } }
-// COW strings don't support C++11 allocators:
+// COW strings don't support C++11 allocator propagation:
// { dg-require-effective-target cxx11-abi }
#include <string>
#include <testsuite_hooks.h>
#include <testsuite_allocator.h>
#include <ext/throw_allocator.h>
-
+
using C = char;
const C c = 'a';
using traits = std::char_traits<C>;
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/allocator/char/move.cc b/libstdc++-v3/testsuite/21_strings/basic_string/allocator/char/move.cc
index e4ff0f25475..11afd4fce47 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/allocator/char/move.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/allocator/char/move.cc
@@ -16,7 +16,7 @@
// <http://www.gnu.org/licenses/>.
// { dg-do run { target c++11 } }
-// COW strings don't support C++11 allocators:
+// COW strings don't support C++11 allocator propagation:
// { dg-require-effective-target cxx11-abi }
#include <string>
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/allocator/char/move_assign.cc b/libstdc++-v3/testsuite/21_strings/basic_string/allocator/char/move_assign.cc
index 253d2486577..6a2db79a14a 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/allocator/char/move_assign.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/allocator/char/move_assign.cc
@@ -5,24 +5,24 @@
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, 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 COPYING3. If not see
// <http://www.gnu.org/licenses/>.
// { dg-do run { target c++11 } }
-// COW strings don't support C++11 allocators:
+// COW strings don't support C++11 allocator propagation:
// { dg-require-effective-target cxx11-abi }
#include <string>
#include <testsuite_hooks.h>
#include <testsuite_allocator.h>
-
+
using C = char;
const C c = 'a';
using traits = std::char_traits<C>;
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/allocator/char/noexcept.cc b/libstdc++-v3/testsuite/21_strings/basic_string/allocator/char/noexcept.cc
index f97bd2adb63..e194048ca75 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/allocator/char/noexcept.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/allocator/char/noexcept.cc
@@ -5,23 +5,23 @@
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, 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 COPYING3. If not see
// <http://www.gnu.org/licenses/>.
// { dg-do compile { target c++11 } }
-// COW strings don't support C++11 allocators:
+// COW strings don't support C++11 allocator propagation:
// { dg-require-effective-target cxx11-abi }
#include <string>
#include <testsuite_allocator.h>
-
+
using C = char;
const C c = 'a';
using traits = std::char_traits<C>;
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/allocator/char/operator_plus.cc b/libstdc++-v3/testsuite/21_strings/basic_string/allocator/char/operator_plus.cc
index e3a326e6aff..eb2e89c2587 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/allocator/char/operator_plus.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/allocator/char/operator_plus.cc
@@ -17,7 +17,7 @@
// <http://www.gnu.org/licenses/>.
// { dg-do run { target c++11 } }
-// COW strings don't support C++11 allocators:
+// COW strings don't support C++11 allocator propagation:
// { dg-require-effective-target cxx11-abi }
#include <string>
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/allocator/char/swap.cc b/libstdc++-v3/testsuite/21_strings/basic_string/allocator/char/swap.cc
index 68c1e69ba51..782a13a43ce 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/allocator/char/swap.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/allocator/char/swap.cc
@@ -5,24 +5,24 @@
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, 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 COPYING3. If not see
// <http://www.gnu.org/licenses/>.
// { dg-do run { target c++11 } }
-// COW strings don't support C++11 allocators:
+// COW strings don't support C++11 allocator propagation:
// { dg-require-effective-target cxx11-abi }
#include <string>
#include <testsuite_hooks.h>
#include <testsuite_allocator.h>
-
+
using C = char;
const C c = 'a';
using traits = std::char_traits<C>;
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/allocator/wchar_t/copy.cc b/libstdc++-v3/testsuite/21_strings/basic_string/allocator/wchar_t/copy.cc
index 90b4bde8cda..2407c671647 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/allocator/wchar_t/copy.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/allocator/wchar_t/copy.cc
@@ -5,24 +5,24 @@
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, 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 COPYING3. If not see
// <http://www.gnu.org/licenses/>.
// { dg-do run { target c++11 } }
-// COW strings don't support C++11 allocators:
+// COW strings don't support C++11 allocator propagation:
// { dg-require-effective-target cxx11-abi }
#include <string>
#include <testsuite_hooks.h>
#include <testsuite_allocator.h>
-
+
using C = wchar_t;
const C c = L'a';
using traits = std::char_traits<C>;
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/allocator/wchar_t/copy_assign.cc b/libstdc++-v3/testsuite/21_strings/basic_string/allocator/wchar_t/copy_assign.cc
index d0221a06fa1..18b79612679 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/allocator/wchar_t/copy_assign.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/allocator/wchar_t/copy_assign.cc
@@ -5,25 +5,25 @@
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, 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 COPYING3. If not see
// <http://www.gnu.org/licenses/>.
// { dg-do run { target c++11 } }
-// COW strings don't support C++11 allocators:
+// COW strings don't support C++11 allocator propagation:
// { dg-require-effective-target cxx11-abi }
#include <string>
#include <testsuite_hooks.h>
#include <testsuite_allocator.h>
#include <ext/throw_allocator.h>
-
+
using C = wchar_t;
const C c = L'a';
using traits = std::char_traits<C>;
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/allocator/wchar_t/move.cc b/libstdc++-v3/testsuite/21_strings/basic_string/allocator/wchar_t/move.cc
index 9a6abf3ceeb..cfc31c410ad 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/allocator/wchar_t/move.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/allocator/wchar_t/move.cc
@@ -16,7 +16,7 @@
// <http://www.gnu.org/licenses/>.
// { dg-do run { target c++11 } }
-// COW strings don't support C++11 allocators:
+// COW strings don't support C++11 allocator propagation:
// { dg-require-effective-target cxx11-abi }
#include <string>
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/allocator/wchar_t/move_assign.cc b/libstdc++-v3/testsuite/21_strings/basic_string/allocator/wchar_t/move_assign.cc
index c7c36ee6b7c..f919ddb6bc0 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/allocator/wchar_t/move_assign.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/allocator/wchar_t/move_assign.cc
@@ -5,24 +5,24 @@
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, 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 COPYING3. If not see
// <http://www.gnu.org/licenses/>.
// { dg-do run { target c++11 } }
-// COW strings don't support C++11 allocators:
+// COW strings don't support C++11 allocator propagation:
// { dg-require-effective-target cxx11-abi }
#include <string>
#include <testsuite_hooks.h>
#include <testsuite_allocator.h>
-
+
using C = wchar_t;
const C c = L'a';
using traits = std::char_traits<C>;
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/allocator/wchar_t/noexcept.cc b/libstdc++-v3/testsuite/21_strings/basic_string/allocator/wchar_t/noexcept.cc
index 2707205cf8d..27b55632d6a 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/allocator/wchar_t/noexcept.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/allocator/wchar_t/noexcept.cc
@@ -5,23 +5,23 @@
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, 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 COPYING3. If not see
// <http://www.gnu.org/licenses/>.
// { dg-do compile { target c++11 } }
-// COW strings don't support C++11 allocators:
+// COW strings don't support C++11 allocator propagation:
// { dg-require-effective-target cxx11-abi }
#include <string>
#include <testsuite_allocator.h>
-
+
using C = wchar_t;
const C c = L'a';
using traits = std::char_traits<C>;
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/allocator/wchar_t/operator_plus.cc b/libstdc++-v3/testsuite/21_strings/basic_string/allocator/wchar_t/operator_plus.cc
index 0648113c55e..dd7d6504ee4 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/allocator/wchar_t/operator_plus.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/allocator/wchar_t/operator_plus.cc
@@ -17,7 +17,7 @@
// <http://www.gnu.org/licenses/>.
// { dg-do run { target c++11 } }
-// COW strings don't support C++11 allocators:
+// COW strings don't support C++11 allocator propagation:
// { dg-require-effective-target cxx11-abi }
#include <string>
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/allocator/wchar_t/swap.cc b/libstdc++-v3/testsuite/21_strings/basic_string/allocator/wchar_t/swap.cc
index 9cfb6b7ddf7..44e65878ba7 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/allocator/wchar_t/swap.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/allocator/wchar_t/swap.cc
@@ -5,24 +5,24 @@
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, 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 COPYING3. If not see
// <http://www.gnu.org/licenses/>.
// { dg-do run { target c++11 } }
-// COW strings don't support C++11 allocators:
+// COW strings don't support C++11 allocator propagation:
// { dg-require-effective-target cxx11-abi }
#include <string>
#include <testsuite_hooks.h>
#include <testsuite_allocator.h>
-
+
using C = wchar_t;
const C c = L'a';
using traits = std::char_traits<C>;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-10-14 11:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-14 11:53 [gcc r11-3869] libstdc++: Improve comments in std::string tests Jonathan Wakely
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).