public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
* [committed] libstdc++: Make some #error strings consistent with other tests
@ 2021-08-12 18:49 Jonathan Wakely
  0 siblings, 0 replies; only message in thread
From: Jonathan Wakely @ 2021-08-12 18:49 UTC (permalink / raw)
  To: libstdc++, gcc-patches

[-- Attachment #1: Type: text/plain, Size: 300 bytes --]

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.

Tested powerpc64le-linux. Committed to trunk.


[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 2469 bytes --]

commit b1c0e8599aa6ff5550dc748679e13c1eb492ee2c
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Thu Aug 12 18:02:40 2021

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

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

only message in thread, other threads:[~2021-08-12 18:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-12 18:49 [committed] libstdc++: Make some #error strings consistent with other tests 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).