libstdc++: Improve tests for __cpp_lib_erase_if macro

* testsuite/21_strings/basic_string/erasure.cc: Check for updated
	value of __cpp_lib_erase_if.
	* testsuite/23_containers/deque/erasure.cc: Likewise.
	* testsuite/23_containers/forward_list/erasure.cc: Likewise.
	* testsuite/23_containers/list/erasure.cc: Likewise.
	* testsuite/23_containers/map/erasure.cc: Likewise.
	* testsuite/23_containers/set/erasure.cc: Likewise.
	* testsuite/23_containers/unordered_map/erasure.cc: Likewise.
	* testsuite/23_containers/unordered_set/erasure.cc: Likewise.
	* testsuite/23_containers/vector/erasure.cc: Likewise.
This commit is contained in:
Jonathan Wakely 2020-04-22 07:21:01 +01:00
parent 05f1493811
commit 0fe9eaaa08
10 changed files with 36 additions and 16 deletions

View File

@ -1,3 +1,17 @@
2020-04-22 Jonathan Wakely <jwakely@redhat.com>
* testsuite/21_strings/basic_string/erasure.cc: Check for
__cpp_lib_erase_if macro.
* testsuite/23_containers/deque/erasure.cc: Add header name to #error
messages.
* testsuite/23_containers/forward_list/erasure.cc: Likewise.
* testsuite/23_containers/list/erasure.cc: Likewise.
* testsuite/23_containers/map/erasure.cc: Likewise.
* testsuite/23_containers/set/erasure.cc: Likewise.
* testsuite/23_containers/unordered_map/erasure.cc: Likewise.
* testsuite/23_containers/unordered_set/erasure.cc: Likewise.
* testsuite/23_containers/vector/erasure.cc: Likewise.
2020-04-21 Jonathan Wakely <jwakely@redhat.com>
* include/bits/stl_iterator.h (__normal_iterator): Use synth-three-way

View File

@ -21,6 +21,12 @@
#include <string>
#include <testsuite_hooks.h>
#ifndef __cpp_lib_erase_if
# error "Feature-test macro for erase_if missing in <string>"
#elif __cpp_lib_erase_if < 202002
# error "Feature-test macro for erase_if has wrong value in <string>"
#endif
void
test01()
{

View File

@ -22,9 +22,9 @@
#include <testsuite_hooks.h>
#ifndef __cpp_lib_erase_if
# error "Feature-test macro for erase_if missing"
# error "Feature-test macro for erase_if missing in <deque>"
#elif __cpp_lib_erase_if < 202002
# error "Feature-test macro for erase_if has wrong value"
# error "Feature-test macro for erase_if has wrong value in <deque>"
#endif
void

View File

@ -22,9 +22,9 @@
#include <testsuite_hooks.h>
#ifndef __cpp_lib_erase_if
# error "Feature-test macro for erase_if missing"
# error "Feature-test macro for erase_if missing in <forward_list>"
#elif __cpp_lib_erase_if < 202002
# error "Feature-test macro for erase_if has wrong value"
# error "Feature-test macro for erase_if has wrong value in <forward_list>"
#endif
void

View File

@ -22,9 +22,9 @@
#include <testsuite_hooks.h>
#ifndef __cpp_lib_erase_if
# error "Feature-test macro for erase_if missing"
# error "Feature-test macro for erase_if missing in <list>"
#elif __cpp_lib_erase_if < 202002
# error "Feature-test macro for erase_if has wrong value"
# error "Feature-test macro for erase_if has wrong value in <list>"
#endif
void

View File

@ -23,9 +23,9 @@
#include <testsuite_hooks.h>
#ifndef __cpp_lib_erase_if
# error "Feature-test macro for erase_if missing"
# error "Feature-test macro for erase_if missing in <map>"
#elif __cpp_lib_erase_if < 202002
# error "Feature-test macro for erase_if has wrong value"
# error "Feature-test macro for erase_if has wrong value in <map>"
#endif
auto is_odd_pair = [](const std::pair<const int, std::string>& p)

View File

@ -22,9 +22,9 @@
#include <testsuite_hooks.h>
#ifndef __cpp_lib_erase_if
# error "Feature-test macro for erase_if missing"
# error "Feature-test macro for erase_if missing in <set>"
#elif __cpp_lib_erase_if < 202002
# error "Feature-test macro for erase_if has wrong value"
# error "Feature-test macro for erase_if has wrong value in <set>"
#endif
auto is_odd = [](const int i) { return i % 2 != 0; };

View File

@ -23,9 +23,9 @@
#include <testsuite_hooks.h>
#ifndef __cpp_lib_erase_if
# error "Feature-test macro for erase_if missing"
# error "Feature-test macro for erase_if missing in <unordered_map>"
#elif __cpp_lib_erase_if < 202002
# error "Feature-test macro for erase_if has wrong value"
# error "Feature-test macro for erase_if has wrong value in <unordered_map>"
#endif
auto is_odd_pair = [](const std::pair<const int, std::string>& p)

View File

@ -22,9 +22,9 @@
#include <testsuite_hooks.h>
#ifndef __cpp_lib_erase_if
# error "Feature-test macro for erase_if missing"
# error "Feature-test macro for erase_if missing in <unordered_set>"
#elif __cpp_lib_erase_if < 202002
# error "Feature-test macro for erase_if has wrong value"
# error "Feature-test macro for erase_if has wrong value in <unordered_set>"
#endif
void

View File

@ -22,9 +22,9 @@
#include <testsuite_hooks.h>
#ifndef __cpp_lib_erase_if
# error "Feature-test macro for erase_if missing"
# error "Feature-test macro for erase_if missing in <vector>"
#elif __cpp_lib_erase_if < 202002
# error "Feature-test macro for erase_if has wrong value"
# error "Feature-test macro for erase_if has wrong value in <vector>"
#endif
void