[committed] libstdc++: Improve comments in std::string tests
Jonathan Wakely
jwakely@redhat.com
Wed Oct 14 11:54:26 GMT 2020
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.
Tested powerpc64le-linux. Committed to trunk.
-------------- next part --------------
commit 5e961dba46a84b5c4ba5086d05db6ff449d8682f
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Wed Oct 14 12:07:31 2020
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 --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>;
More information about the Gcc-patches
mailing list