This is an archive of the discontinued LLVM Phabricator instance.

[libc++] [test] Iterator non-invalidation tests for list and unordered_*
ClosedPublic

Authored by Quuxplusone on May 6 2021, 9:56 AM.

Details

Reviewers
krisb
Quuxplusone
Group Reviewers
Restricted Project
Summary

This is a patch series split out of 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@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@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@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@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@gmail.com>
Date: Thu May 6 11:42:25 2021 -0400

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

Diff Detail

libcxx/test/libcxx/containers/unord/unord.multimap/db_move.pass.cpp