public inbox for gcc-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 r12-2885] libstdc++: Make some #error strings consistent with other tests
Date: Thu, 12 Aug 2021 18:46:40 +0000 (GMT)	[thread overview]
Message-ID: <20210812184640.2C21139B90AA@sourceware.org> (raw)

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

commit r12-2885-gb1c0e8599aa6ff5550dc748679e13c1eb492ee2c
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Thu Aug 12 18:02:40 2021 +0100

    libstdc++: Make some #error strings consistent with other tests
    
    Signed-off-by: Jonathan Wakely <jwakely@redhat.com>
    
    libstdc++-v3/ChangeLog:
    
            * testsuite/26_numerics/lerp.cc: Add header name to #error.
            * testsuite/26_numerics/midpoint/integral.cc: Likewise.
            * testsuite/26_numerics/midpoint/version.cc: New test.

Diff:
---
 libstdc++-v3/testsuite/26_numerics/lerp.cc              |  4 ++--
 libstdc++-v3/testsuite/26_numerics/midpoint/integral.cc |  4 ++--
 libstdc++-v3/testsuite/26_numerics/midpoint/version.cc  | 10 ++++++++++
 3 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/libstdc++-v3/testsuite/26_numerics/lerp.cc b/libstdc++-v3/testsuite/26_numerics/lerp.cc
index e456b8203a5..d74b745abb9 100644
--- a/libstdc++-v3/testsuite/26_numerics/lerp.cc
+++ b/libstdc++-v3/testsuite/26_numerics/lerp.cc
@@ -21,9 +21,9 @@
 #include <cmath>
 
 #ifndef __cpp_lib_interpolate
-# error "Feature-test macro for midpoint and lerp missing"
+# error "Feature-test macro for midpoint and lerp missing in <cmath>"
 #elif __cpp_lib_interpolate != 201902L
-# error "Feature-test macro for midpoint and lerp has wrong value"
+# error "Feature-test macro for midpoint and lerp has wrong value in <cmath>"
 #endif
 
 #include <limits>
diff --git a/libstdc++-v3/testsuite/26_numerics/midpoint/integral.cc b/libstdc++-v3/testsuite/26_numerics/midpoint/integral.cc
index 1094b668144..d74279ea4b3 100644
--- a/libstdc++-v3/testsuite/26_numerics/midpoint/integral.cc
+++ b/libstdc++-v3/testsuite/26_numerics/midpoint/integral.cc
@@ -21,9 +21,9 @@
 #include <numeric>
 
 #ifndef __cpp_lib_interpolate
-# error "Feature-test macro for midpoint and lerp missing"
+# error "Feature-test macro for midpoint and lerp missing in <numeric>"
 #elif __cpp_lib_interpolate != 201902L
-# error "Feature-test macro for midpoint and lerp has wrong value"
+# error "Feature-test macro for midpoint and lerp has wrong value in <numeric>"
 #endif
 
 #include <climits>
diff --git a/libstdc++-v3/testsuite/26_numerics/midpoint/version.cc b/libstdc++-v3/testsuite/26_numerics/midpoint/version.cc
new file mode 100644
index 00000000000..3ccb032bc67
--- /dev/null
+++ b/libstdc++-v3/testsuite/26_numerics/midpoint/version.cc
@@ -0,0 +1,10 @@
+// { dg-options "-std=gnu++2a" }
+// { dg-do preprocess { target c++2a } }
+
+#include <version>
+
+#ifndef __cpp_lib_interpolate
+# error "Feature-test macro for midpoint and lerp missing in <version>"
+#elif __cpp_lib_interpolate != 201902L
+# error "Feature-test macro for midpoint and lerp has wrong value in <version>"
+#endif


                 reply	other threads:[~2021-08-12 18:46 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=20210812184640.2C21139B90AA@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).