[PATCH] D21098: [libcxx] [test] Replace __cplusplus comparisons with TEST_STD_VER and __has_feature with TEST_HAS_FEATURE.

Stephan T. Lavavej via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 7 12:38:14 PDT 2016


STL_MSFT created this revision.
STL_MSFT added reviewers: mclow.lists, EricWF.
STL_MSFT added a subscriber: cfe-commits.

Replace __cplusplus comparisons with TEST_STD_VER and __has_feature with TEST_HAS_FEATURE.

These replacements were performed by a script. Additional changes performed manually:

Include test_macros.h when it's needed and we weren't already dragging it in.

Manually update test/support/count_new.hpp to use TEST_HAS_FEATURE.

In test/support/test_macros.h, allow TEST_STD_VER to be overridden. (I'm doing this through a force-included header in my test harness. This change to test_macros.h is necessary because I can't modify __cplusplus itself.)

http://reviews.llvm.org/D21098

Files:
  test/std/algorithms/alg.sorting/alg.min.max/max_element.pass.cpp
  test/std/algorithms/alg.sorting/alg.min.max/max_element_comp.pass.cpp
  test/std/algorithms/alg.sorting/alg.min.max/min_element.pass.cpp
  test/std/algorithms/alg.sorting/alg.min.max/min_element_comp.pass.cpp
  test/std/algorithms/alg.sorting/alg.min.max/minmax_element.pass.cpp
  test/std/algorithms/alg.sorting/alg.min.max/minmax_element_comp.pass.cpp
  test/std/containers/associative/map/map.access/at.pass.cpp
  test/std/containers/associative/map/map.access/empty.pass.cpp
  test/std/containers/associative/map/map.access/iterator.pass.cpp
  test/std/containers/associative/map/map.access/max_size.pass.cpp
  test/std/containers/associative/map/map.access/size.pass.cpp
  test/std/containers/associative/map/map.cons/alloc.pass.cpp
  test/std/containers/associative/map/map.cons/assign_initializer_list.pass.cpp
  test/std/containers/associative/map/map.cons/compare.pass.cpp
  test/std/containers/associative/map/map.cons/compare_alloc.pass.cpp
  test/std/containers/associative/map/map.cons/copy.pass.cpp
  test/std/containers/associative/map/map.cons/copy_alloc.pass.cpp
  test/std/containers/associative/map/map.cons/copy_assign.pass.cpp
  test/std/containers/associative/map/map.cons/default.pass.cpp
  test/std/containers/associative/map/map.cons/default_noexcept.pass.cpp
  test/std/containers/associative/map/map.cons/dtor_noexcept.pass.cpp
  test/std/containers/associative/map/map.cons/initializer_list.pass.cpp
  test/std/containers/associative/map/map.cons/initializer_list_compare.pass.cpp
  test/std/containers/associative/map/map.cons/initializer_list_compare_alloc.pass.cpp
  test/std/containers/associative/map/map.cons/iter_iter.pass.cpp
  test/std/containers/associative/map/map.cons/iter_iter_comp.pass.cpp
  test/std/containers/associative/map/map.cons/iter_iter_comp_alloc.pass.cpp
  test/std/containers/associative/map/map.cons/move.pass.cpp
  test/std/containers/associative/map/map.cons/move_alloc.pass.cpp
  test/std/containers/associative/map/map.cons/move_assign.pass.cpp
  test/std/containers/associative/map/map.cons/move_assign_noexcept.pass.cpp
  test/std/containers/associative/map/map.cons/move_noexcept.pass.cpp
  test/std/containers/associative/map/map.modifiers/clear.pass.cpp
  test/std/containers/associative/map/map.modifiers/emplace.pass.cpp
  test/std/containers/associative/map/map.modifiers/emplace_hint.pass.cpp
  test/std/containers/associative/map/map.modifiers/erase_iter.pass.cpp
  test/std/containers/associative/map/map.modifiers/erase_iter_iter.pass.cpp
  test/std/containers/associative/map/map.modifiers/erase_key.pass.cpp
  test/std/containers/associative/map/map.modifiers/insert_initializer_list.pass.cpp
  test/std/containers/associative/map/map.modifiers/insert_iter_iter.pass.cpp
  test/std/containers/associative/map/map.ops/count.pass.cpp
  test/std/containers/associative/map/map.ops/equal_range.pass.cpp
  test/std/containers/associative/map/map.ops/find.pass.cpp
  test/std/containers/associative/map/map.ops/lower_bound.pass.cpp
  test/std/containers/associative/map/map.ops/upper_bound.pass.cpp
  test/std/containers/associative/map/map.special/member_swap.pass.cpp
  test/std/containers/associative/map/map.special/non_member_swap.pass.cpp
  test/std/containers/associative/map/types.pass.cpp
  test/std/containers/associative/multimap/empty.pass.cpp
  test/std/containers/associative/multimap/iterator.pass.cpp
  test/std/containers/associative/multimap/max_size.pass.cpp
  test/std/containers/associative/multimap/multimap.cons/alloc.pass.cpp
  test/std/containers/associative/multimap/multimap.cons/assign_initializer_list.pass.cpp
  test/std/containers/associative/multimap/multimap.cons/compare.pass.cpp
  test/std/containers/associative/multimap/multimap.cons/compare_alloc.pass.cpp
  test/std/containers/associative/multimap/multimap.cons/copy.pass.cpp
  test/std/containers/associative/multimap/multimap.cons/copy_alloc.pass.cpp
  test/std/containers/associative/multimap/multimap.cons/copy_assign.pass.cpp
  test/std/containers/associative/multimap/multimap.cons/default.pass.cpp
  test/std/containers/associative/multimap/multimap.cons/default_noexcept.pass.cpp
  test/std/containers/associative/multimap/multimap.cons/dtor_noexcept.pass.cpp
  test/std/containers/associative/multimap/multimap.cons/initializer_list.pass.cpp
  test/std/containers/associative/multimap/multimap.cons/initializer_list_compare.pass.cpp
  test/std/containers/associative/multimap/multimap.cons/initializer_list_compare_alloc.pass.cpp
  test/std/containers/associative/multimap/multimap.cons/iter_iter.pass.cpp
  test/std/containers/associative/multimap/multimap.cons/iter_iter_comp.pass.cpp
  test/std/containers/associative/multimap/multimap.cons/iter_iter_comp_alloc.pass.cpp
  test/std/containers/associative/multimap/multimap.cons/move.pass.cpp
  test/std/containers/associative/multimap/multimap.cons/move_alloc.pass.cpp
  test/std/containers/associative/multimap/multimap.cons/move_assign.pass.cpp
  test/std/containers/associative/multimap/multimap.cons/move_assign_noexcept.pass.cpp
  test/std/containers/associative/multimap/multimap.cons/move_noexcept.pass.cpp
  test/std/containers/associative/multimap/multimap.modifiers/clear.pass.cpp
  test/std/containers/associative/multimap/multimap.modifiers/emplace.pass.cpp
  test/std/containers/associative/multimap/multimap.modifiers/emplace_hint.pass.cpp
  test/std/containers/associative/multimap/multimap.modifiers/erase_iter.pass.cpp
  test/std/containers/associative/multimap/multimap.modifiers/erase_iter_iter.pass.cpp
  test/std/containers/associative/multimap/multimap.modifiers/erase_key.pass.cpp
  test/std/containers/associative/multimap/multimap.modifiers/insert_initializer_list.pass.cpp
  test/std/containers/associative/multimap/multimap.modifiers/insert_iter_iter.pass.cpp
  test/std/containers/associative/multimap/multimap.ops/count.pass.cpp
  test/std/containers/associative/multimap/multimap.ops/equal_range.pass.cpp
  test/std/containers/associative/multimap/multimap.ops/find.pass.cpp
  test/std/containers/associative/multimap/multimap.ops/lower_bound.pass.cpp
  test/std/containers/associative/multimap/multimap.ops/upper_bound.pass.cpp
  test/std/containers/associative/multimap/multimap.special/member_swap.pass.cpp
  test/std/containers/associative/multimap/multimap.special/non_member_swap.pass.cpp
  test/std/containers/associative/multimap/size.pass.cpp
  test/std/containers/associative/multimap/types.pass.cpp
  test/std/containers/associative/multiset/clear.pass.cpp
  test/std/containers/associative/multiset/count.pass.cpp
  test/std/containers/associative/multiset/emplace.pass.cpp
  test/std/containers/associative/multiset/emplace_hint.pass.cpp
  test/std/containers/associative/multiset/empty.pass.cpp
  test/std/containers/associative/multiset/equal_range.pass.cpp
  test/std/containers/associative/multiset/erase_iter.pass.cpp
  test/std/containers/associative/multiset/erase_iter_iter.pass.cpp
  test/std/containers/associative/multiset/erase_key.pass.cpp
  test/std/containers/associative/multiset/find.pass.cpp
  test/std/containers/associative/multiset/insert_cv.pass.cpp
  test/std/containers/associative/multiset/insert_initializer_list.pass.cpp
  test/std/containers/associative/multiset/insert_iter_cv.pass.cpp
  test/std/containers/associative/multiset/insert_iter_iter.pass.cpp
  test/std/containers/associative/multiset/insert_iter_rv.pass.cpp
  test/std/containers/associative/multiset/insert_rv.pass.cpp
  test/std/containers/associative/multiset/iterator.pass.cpp
  test/std/containers/associative/multiset/lower_bound.pass.cpp
  test/std/containers/associative/multiset/max_size.pass.cpp
  test/std/containers/associative/multiset/multiset.cons/assign_initializer_list.pass.cpp
  test/std/containers/associative/multiset/multiset.cons/default.pass.cpp
  test/std/containers/associative/multiset/multiset.cons/default_noexcept.pass.cpp
  test/std/containers/associative/multiset/multiset.cons/dtor_noexcept.pass.cpp
  test/std/containers/associative/multiset/multiset.cons/initializer_list.pass.cpp
  test/std/containers/associative/multiset/multiset.cons/iter_iter.pass.cpp
  test/std/containers/associative/multiset/multiset.cons/move.pass.cpp
  test/std/containers/associative/multiset/multiset.cons/move_assign.pass.cpp
  test/std/containers/associative/multiset/multiset.cons/move_assign_noexcept.pass.cpp
  test/std/containers/associative/multiset/multiset.cons/move_noexcept.pass.cpp
  test/std/containers/associative/multiset/multiset.special/member_swap.pass.cpp
  test/std/containers/associative/multiset/size.pass.cpp
  test/std/containers/associative/multiset/types.pass.cpp
  test/std/containers/associative/multiset/upper_bound.pass.cpp
  test/std/containers/associative/set/clear.pass.cpp
  test/std/containers/associative/set/count.pass.cpp
  test/std/containers/associative/set/emplace.pass.cpp
  test/std/containers/associative/set/emplace_hint.pass.cpp
  test/std/containers/associative/set/empty.pass.cpp
  test/std/containers/associative/set/equal_range.pass.cpp
  test/std/containers/associative/set/erase_iter.pass.cpp
  test/std/containers/associative/set/erase_iter_iter.pass.cpp
  test/std/containers/associative/set/erase_key.pass.cpp
  test/std/containers/associative/set/find.pass.cpp
  test/std/containers/associative/set/insert_cv.pass.cpp
  test/std/containers/associative/set/insert_initializer_list.pass.cpp
  test/std/containers/associative/set/insert_iter_cv.pass.cpp
  test/std/containers/associative/set/insert_iter_iter.pass.cpp
  test/std/containers/associative/set/insert_iter_rv.pass.cpp
  test/std/containers/associative/set/insert_rv.pass.cpp
  test/std/containers/associative/set/iterator.pass.cpp
  test/std/containers/associative/set/lower_bound.pass.cpp
  test/std/containers/associative/set/max_size.pass.cpp
  test/std/containers/associative/set/set.cons/assign_initializer_list.pass.cpp
  test/std/containers/associative/set/set.cons/default.pass.cpp
  test/std/containers/associative/set/set.cons/default_noexcept.pass.cpp
  test/std/containers/associative/set/set.cons/dtor_noexcept.pass.cpp
  test/std/containers/associative/set/set.cons/initializer_list.pass.cpp
  test/std/containers/associative/set/set.cons/iter_iter.pass.cpp
  test/std/containers/associative/set/set.cons/move.pass.cpp
  test/std/containers/associative/set/set.cons/move_assign.pass.cpp
  test/std/containers/associative/set/set.cons/move_assign_noexcept.pass.cpp
  test/std/containers/associative/set/set.cons/move_noexcept.pass.cpp
  test/std/containers/associative/set/set.special/member_swap.pass.cpp
  test/std/containers/associative/set/size.pass.cpp
  test/std/containers/associative/set/types.pass.cpp
  test/std/containers/associative/set/upper_bound.pass.cpp
  test/std/containers/container.adaptors/priority.queue/priqueue.cons/default_noexcept.pass.cpp
  test/std/containers/container.adaptors/priority.queue/priqueue.cons/dtor_noexcept.pass.cpp
  test/std/containers/container.adaptors/priority.queue/priqueue.cons/move_assign_noexcept.pass.cpp
  test/std/containers/container.adaptors/priority.queue/priqueue.cons/move_noexcept.pass.cpp
  test/std/containers/container.adaptors/priority.queue/priqueue.special/swap_noexcept.pass.cpp
  test/std/containers/container.adaptors/queue/queue.cons/default_noexcept.pass.cpp
  test/std/containers/container.adaptors/queue/queue.cons/dtor_noexcept.pass.cpp
  test/std/containers/container.adaptors/queue/queue.cons/move_assign_noexcept.pass.cpp
  test/std/containers/container.adaptors/queue/queue.cons/move_noexcept.pass.cpp
  test/std/containers/container.adaptors/queue/queue.special/swap_noexcept.pass.cpp
  test/std/containers/container.adaptors/stack/stack.cons/default_noexcept.pass.cpp
  test/std/containers/container.adaptors/stack/stack.cons/dtor_noexcept.pass.cpp
  test/std/containers/container.adaptors/stack/stack.cons/move_assign_noexcept.pass.cpp
  test/std/containers/container.adaptors/stack/stack.cons/move_noexcept.pass.cpp
  test/std/containers/container.adaptors/stack/stack.special/swap_noexcept.pass.cpp
  test/std/containers/sequences/deque/deque.capacity/access.pass.cpp
  test/std/containers/sequences/deque/deque.cons/alloc.pass.cpp
  test/std/containers/sequences/deque/deque.cons/assign_initializer_list.pass.cpp
  test/std/containers/sequences/deque/deque.cons/copy.pass.cpp
  test/std/containers/sequences/deque/deque.cons/copy_alloc.pass.cpp
  test/std/containers/sequences/deque/deque.cons/default.pass.cpp
  test/std/containers/sequences/deque/deque.cons/default_noexcept.pass.cpp
  test/std/containers/sequences/deque/deque.cons/dtor_noexcept.pass.cpp
  test/std/containers/sequences/deque/deque.cons/initializer_list.pass.cpp
  test/std/containers/sequences/deque/deque.cons/initializer_list_alloc.pass.cpp
  test/std/containers/sequences/deque/deque.cons/iter_iter.pass.cpp
  test/std/containers/sequences/deque/deque.cons/iter_iter_alloc.pass.cpp
  test/std/containers/sequences/deque/deque.cons/move.pass.cpp
  test/std/containers/sequences/deque/deque.cons/move_alloc.pass.cpp
  test/std/containers/sequences/deque/deque.cons/move_assign.pass.cpp
  test/std/containers/sequences/deque/deque.cons/move_assign_noexcept.pass.cpp
  test/std/containers/sequences/deque/deque.cons/move_noexcept.pass.cpp
  test/std/containers/sequences/deque/deque.cons/op_equal.pass.cpp
  test/std/containers/sequences/deque/deque.cons/op_equal_initializer_list.pass.cpp
  test/std/containers/sequences/deque/deque.cons/size.pass.cpp
  test/std/containers/sequences/deque/deque.cons/size_value.pass.cpp
  test/std/containers/sequences/deque/deque.cons/size_value_alloc.pass.cpp
  test/std/containers/sequences/deque/deque.modifiers/emplace_back.pass.cpp
  test/std/containers/sequences/deque/deque.modifiers/emplace_front.pass.cpp
  test/std/containers/sequences/deque/deque.modifiers/erase_iter.pass.cpp
  test/std/containers/sequences/deque/deque.modifiers/erase_iter_iter.pass.cpp
  test/std/containers/sequences/deque/deque.modifiers/pop_back.pass.cpp
  test/std/containers/sequences/deque/deque.modifiers/pop_front.pass.cpp
  test/std/containers/sequences/deque/deque.modifiers/push_back.pass.cpp
  test/std/containers/sequences/deque/deque.modifiers/push_back_rvalue.pass.cpp
  test/std/containers/sequences/deque/deque.modifiers/push_front.pass.cpp
  test/std/containers/sequences/deque/deque.modifiers/push_front_rvalue.pass.cpp
  test/std/containers/sequences/deque/deque.special/copy.pass.cpp
  test/std/containers/sequences/deque/deque.special/copy_backward.pass.cpp
  test/std/containers/sequences/deque/deque.special/move.pass.cpp
  test/std/containers/sequences/deque/deque.special/move_backward.pass.cpp
  test/std/containers/sequences/deque/deque.special/swap.pass.cpp
  test/std/containers/sequences/deque/iterators.pass.cpp
  test/std/containers/sequences/deque/types.pass.cpp
  test/std/containers/sequences/forwardlist/forwardlist.access/front.pass.cpp
  test/std/containers/sequences/forwardlist/forwardlist.cons/alloc.pass.cpp
  test/std/containers/sequences/forwardlist/forwardlist.cons/assign_copy.pass.cpp
  test/std/containers/sequences/forwardlist/forwardlist.cons/assign_init.pass.cpp
  test/std/containers/sequences/forwardlist/forwardlist.cons/assign_move.pass.cpp
  test/std/containers/sequences/forwardlist/forwardlist.cons/assign_op_init.pass.cpp
  test/std/containers/sequences/forwardlist/forwardlist.cons/assign_range.pass.cpp
  test/std/containers/sequences/forwardlist/forwardlist.cons/assign_size_value.pass.cpp
  test/std/containers/sequences/forwardlist/forwardlist.cons/copy.pass.cpp
  test/std/containers/sequences/forwardlist/forwardlist.cons/copy_alloc.pass.cpp
  test/std/containers/sequences/forwardlist/forwardlist.cons/default.pass.cpp
  test/std/containers/sequences/forwardlist/forwardlist.cons/default_noexcept.pass.cpp
  test/std/containers/sequences/forwardlist/forwardlist.cons/dtor_noexcept.pass.cpp
  test/std/containers/sequences/forwardlist/forwardlist.cons/init.pass.cpp
  test/std/containers/sequences/forwardlist/forwardlist.cons/init_alloc.pass.cpp
  test/std/containers/sequences/forwardlist/forwardlist.cons/move.pass.cpp
  test/std/containers/sequences/forwardlist/forwardlist.cons/move_alloc.pass.cpp
  test/std/containers/sequences/forwardlist/forwardlist.cons/move_assign_noexcept.pass.cpp
  test/std/containers/sequences/forwardlist/forwardlist.cons/move_noexcept.pass.cpp
  test/std/containers/sequences/forwardlist/forwardlist.cons/range.pass.cpp
  test/std/containers/sequences/forwardlist/forwardlist.cons/range_alloc.pass.cpp
  test/std/containers/sequences/forwardlist/forwardlist.cons/size.pass.cpp
  test/std/containers/sequences/forwardlist/forwardlist.cons/size_value.pass.cpp
  test/std/containers/sequences/forwardlist/forwardlist.cons/size_value_alloc.pass.cpp
  test/std/containers/sequences/forwardlist/forwardlist.iter/before_begin.pass.cpp
  test/std/containers/sequences/forwardlist/forwardlist.iter/iterators.pass.cpp
  test/std/containers/sequences/forwardlist/forwardlist.modifiers/clear.pass.cpp
  test/std/containers/sequences/forwardlist/forwardlist.modifiers/emplace_after.pass.cpp
  test/std/containers/sequences/forwardlist/forwardlist.modifiers/emplace_front.pass.cpp
  test/std/containers/sequences/forwardlist/forwardlist.modifiers/erase_after_many.pass.cpp
  test/std/containers/sequences/forwardlist/forwardlist.modifiers/erase_after_one.pass.cpp
  test/std/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_const.pass.cpp
  test/std/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_init.pass.cpp
  test/std/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_range.pass.cpp
  test/std/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_rv.pass.cpp
  test/std/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_size_value.pass.cpp
  test/std/containers/sequences/forwardlist/forwardlist.modifiers/pop_front.pass.cpp
  test/std/containers/sequences/forwardlist/forwardlist.modifiers/push_front_const.pass.cpp
  test/std/containers/sequences/forwardlist/forwardlist.modifiers/push_front_rv.pass.cpp
  test/std/containers/sequences/forwardlist/forwardlist.modifiers/resize_size.pass.cpp
  test/std/containers/sequences/forwardlist/forwardlist.ops/merge.pass.cpp
  (573 more files...)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D21098.59937.patch
Type: text/x-patch
Size: 483824 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160607/7175734e/attachment-0001.bin>


More information about the cfe-commits mailing list