[libcxx-commits] [PATCH] D102003: [libc++] [test] Iterator non-invalidation tests for list and unordered_*

Arthur O'Dwyer via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu May 6 09:56:37 PDT 2021


Quuxplusone created this revision.
Quuxplusone added reviewers: krisb, libc++.
Quuxplusone added a project: libc++.
Quuxplusone requested review of this revision.
Herald added a subscriber: libcxx-commits.
Herald added 1 blocking reviewer(s): libc++.

This is a patch series split out of D100595 <https://reviews.llvm.org/D100595>. A few tests over there were verifying that iterators were not invalidated on swap/move of various containers... but they were doing it only in debug-iterator mode. We should do those tests in all modes. These days we can rely on the `debug_level=1` CI job to run the tests in debug-iterator mode.
I plan to land this if buildkite is happy with it.

commit 4344af48dced153a47dfc4ccd673279e3071c0a9
Author: Arthur O'Dwyer <arthur.j.odwyer at gmail.com>
Date:   Thu May 6 12:50:52 2021 -0400

  [libc++] [test] Test that unordered_* move-construct/move-assign does not invalidate iterators.
  
  And remove the dedicated debug-iterator tests; we want to test this in all modes.
  We have a CI step for testing the whole test suite with `--debug_level=1` now.

commit 64f343334538e762c8be0c947dbc12a28c4430e8
Author: Arthur O'Dwyer <arthur.j.odwyer at gmail.com>
Date:   Thu May 6 12:18:09 2021 -0400

  [libc++] [test] Test that unordered_*::swap does not invalidate iterators.

commit fc90d836c31d781efb6ee73bc5d628949e8bced8
Author: Arthur O'Dwyer <arthur.j.odwyer at gmail.com>
Date:   Thu May 6 12:05:08 2021 -0400

  [libc++] [test] Test that list move-construct/move-assign does not invalidate iterators.
  
  And remove the dedicated debug-iterator test; we want to test this in all modes.
  We have a CI step for testing the whole test suite with `--debug_level=1` now.

commit 15f4cf46c1024368d222a34b24886c32dcd6f805
Author: Arthur O'Dwyer <arthur.j.odwyer at gmail.com>
Date:   Thu May 6 11:53:10 2021 -0400

  [libc++] [test] Simplify arithmetic in list.special/swap.pass.cpp. NFCI.

commit 1b731aacd63121eb2243d9a94e6280d81f686d5f
Author: Arthur O'Dwyer <arthur.j.odwyer at gmail.com>
Date:   Thu May 6 11:42:25 2021 -0400

  [libc++] [test] Test that list::swap does not invalidate iterators.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D102003

Files:
  libcxx/test/libcxx/containers/sequences/list/list.cons/db_move.pass.cpp
  libcxx/test/libcxx/containers/unord/unord.map/db_move.pass.cpp
  libcxx/test/libcxx/containers/unord/unord.multimap/db_move.pass.cpp
  libcxx/test/libcxx/containers/unord/unord.multiset/db_move.pass.cpp
  libcxx/test/libcxx/containers/unord/unord.set/db_move.pass.cpp
  libcxx/test/std/containers/sequences/list/list.cons/assign_move.pass.cpp
  libcxx/test/std/containers/sequences/list/list.cons/move.pass.cpp
  libcxx/test/std/containers/sequences/list/list.special/swap.pass.cpp
  libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/assign_move.pass.cpp
  libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/move.pass.cpp
  libcxx/test/std/containers/unord/unord.map/unord.map.swap/swap_non_member.pass.cpp
  libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/assign_move.pass.cpp
  libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/move.pass.cpp
  libcxx/test/std/containers/unord/unord.multimap/unord.multimap.swap/swap_non_member.pass.cpp
  libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/assign_move.pass.cpp
  libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move.pass.cpp
  libcxx/test/std/containers/unord/unord.multiset/unord.multiset.swap/swap_non_member.pass.cpp
  libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/assign_move.pass.cpp
  libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/move.pass.cpp
  libcxx/test/std/containers/unord/unord.set/unord.set.swap/swap_non_member.pass.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102003.343441.patch
Type: text/x-patch
Size: 43413 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210506/d6dd9b59/attachment-0001.bin>


More information about the libcxx-commits mailing list