public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
From: Aldy Hernandez <aldyh@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org
Subject: [gcc/devel/ranger] libstdc++: test for failing assertion should use 'run' not 'compile'
Date: Wed, 17 Jun 2020 19:17:44 +0000 (GMT)	[thread overview]
Message-ID: <20200617191744.8B04939D7401@sourceware.org> (raw)

https://gcc.gnu.org/g:4735f92d48c373031be296fd0f7a2cf31fc955da

commit 4735f92d48c373031be296fd0f7a2cf31fc955da
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Fri Feb 28 17:05:45 2020 +0000

    libstdc++: test for failing assertion should use 'run' not 'compile'
    
    And it only needs to define _GLIBCXX_ASSERTIONS not _GLIBCXX_DEBUG.
    
            * testsuite/24_iterators/range_operations/advance_debug_neg.cc: Run
            test instead of just compiling it.

Diff:
---
 libstdc++-v3/ChangeLog                                         |  5 +++++
 .../24_iterators/range_operations/advance_debug_neg.cc         | 10 ++++++++--
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 0feef87cce6..98eaff92fd1 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,8 @@
+2020-02-28  Jonathan Wakely  <jwakely@redhat.com>
+
+	* testsuite/24_iterators/range_operations/advance_debug_neg.cc: Run
+	test instead of just compiling it.
+
 2020-02-28  Patrick Palka  <ppalka@redhat.com>
 
 	* include/std/ranges (reverse_view::_S_needs_cached_begin): Set to false
diff --git a/libstdc++-v3/testsuite/24_iterators/range_operations/advance_debug_neg.cc b/libstdc++-v3/testsuite/24_iterators/range_operations/advance_debug_neg.cc
index ffda650fb0a..7a1ef97df14 100644
--- a/libstdc++-v3/testsuite/24_iterators/range_operations/advance_debug_neg.cc
+++ b/libstdc++-v3/testsuite/24_iterators/range_operations/advance_debug_neg.cc
@@ -15,8 +15,9 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a -D_GLIBCXX_DEBUG" }
-// { dg-do compile { xfail c++2a } }
+// { dg-options "-std=gnu++2a -D_GLIBCXX_ASSERTIONS" }
+// { dg-do run { xfail *-*-* } }
+// { dg-require-effective-target c++2a }
 
 #include <iterator>
 #include <testsuite_iterators.h>
@@ -29,3 +30,8 @@ test01()
   auto iter = c.begin();
   std::ranges::advance(iter, -1);
 }
+
+int main()
+{
+  test01();
+}


                 reply	other threads:[~2020-06-17 19:17 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=20200617191744.8B04939D7401@sourceware.org \
    --to=aldyh@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).