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.
This commit is contained in:
Jonathan Wakely 2021-08-12 18:02:40 +01:00
parent 20ce14c799
commit b1c0e8599a
3 changed files with 14 additions and 4 deletions

View File

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

View File

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

View File

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