mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-05 05:20:24 +08:00
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:
parent
05f1493811
commit
0fe9eaaa08
@ -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
|
||||
|
@ -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()
|
||||
{
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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; };
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user