public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r9-9385] Improve tests for std::vector<bool> printer
@ 2021-04-20 18:53 Jonathan Wakely
  0 siblings, 0 replies; only message in thread
From: Jonathan Wakely @ 2021-04-20 18:53 UTC (permalink / raw)
  To: gcc-cvs, libstdc++-cvs

https://gcc.gnu.org/g:b2a1a375141bb3d79a6d4d6e7579230ec3687f23

commit r9-9385-gb2a1a375141bb3d79a6d4d6e7579230ec3687f23
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Thu Jun 20 10:04:55 2019 +0100

    Improve tests for std::vector<bool> printer
    
    The current tests wouldn't notice if the vector<bool> contents were
    printed in reverse, because it would read the same forwards and
    backwards. Change the content so the tests would fail if that happened.
    
            * testsuite/libstdc++-prettyprinters/simple.cc: Use non-palindromic
            vector<bool> for test.
            * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
    
    (cherry picked from commit 94872d7f99ceb9da9ecb90064d59d4518c9a6f37)

Diff:
---
 libstdc++-v3/testsuite/libstdc++-prettyprinters/simple.cc   | 3 ++-
 libstdc++-v3/testsuite/libstdc++-prettyprinters/simple11.cc | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/libstdc++-v3/testsuite/libstdc++-prettyprinters/simple.cc b/libstdc++-v3/testsuite/libstdc++-prettyprinters/simple.cc
index 86b7c27d861..5f9526f56b2 100644
--- a/libstdc++-v3/testsuite/libstdc++-prettyprinters/simple.cc
+++ b/libstdc++-v3/testsuite/libstdc++-prettyprinters/simple.cc
@@ -121,11 +121,12 @@ main()
   vb.reserve(100);
   vb.push_back(true);
   vb.push_back(true);
+  vb.push_back(true);
   vb.push_back(false);
   vb.push_back(false);
   vb.push_back(true);
   vb.erase(vb.begin());
-// { dg-final { regexp-test vb {std::(__debug::)?vector<bool> of length 4, capacity 128 = \\{true, false, false, true\\}} } }
+// { dg-final { regexp-test vb {std::(__debug::)?vector<bool> of length 5, capacity 128 = \\{true, true, false, false, true\\}} } }
 
   __gnu_cxx::slist<int> sll;
   sll.push_front(23);
diff --git a/libstdc++-v3/testsuite/libstdc++-prettyprinters/simple11.cc b/libstdc++-v3/testsuite/libstdc++-prettyprinters/simple11.cc
index 5d47bdcd648..414cfed2fd8 100644
--- a/libstdc++-v3/testsuite/libstdc++-prettyprinters/simple11.cc
+++ b/libstdc++-v3/testsuite/libstdc++-prettyprinters/simple11.cc
@@ -114,11 +114,12 @@ main()
   vb.reserve(100);
   vb.push_back(true);
   vb.push_back(true);
+  vb.push_back(true);
   vb.push_back(false);
   vb.push_back(false);
   vb.push_back(true);
   vb.erase(vb.begin());
-// { dg-final { regexp-test vb {std::(__debug::)?vector<bool> of length 4, capacity 128 = \\{true, false, false, true\\}} } }
+// { dg-final { regexp-test vb {std::(__debug::)?vector<bool> of length 5, capacity 128 = \\{true, true, false, false, true\\}} } }
 
   __gnu_cxx::slist<int> sll;
   sll.push_front(23);


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-04-20 18:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-20 18:53 [gcc r9-9385] Improve tests for std::vector<bool> printer 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).