public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
From: Jonathan Wakely <redi@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org
Subject: [gcc r9-9385] Improve tests for std::vector<bool> printer
Date: Tue, 20 Apr 2021 18:53:41 +0000 (GMT)	[thread overview]
Message-ID: <20210420185341.6EA1E388A42B@sourceware.org> (raw)

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);


                 reply	other threads:[~2021-04-20 18:53 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210420185341.6EA1E388A42B@sourceware.org \
    --to=redi@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    --cc=libstdc++-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).