[gdb] Add unit test for gdb::sequential_for_each
authorTom de Vries <tdevries@suse.de>
Fri, 5 Aug 2022 14:12:56 +0000 (16:12 +0200)
committerTom de Vries <tdevries@suse.de>
Fri, 5 Aug 2022 14:12:56 +0000 (16:12 +0200)
commit728d5439e3f5e812246237670f5d9dc9f0d97bae
tree7dfd07a600106ab853f1daa502fffd1961ba9a67
parentb069b588cfe10e6bf20ed723cf796686ba4fc0dc
[gdb] Add unit test for gdb::sequential_for_each

With commit 18a5766d09c ("[gdbsupport] Add sequential_for_each") I added a
drop-in replacement for gdb::parallel_for_each, but there's nothing making
sure that the two remain in sync.

Extend the unit test for gdb::parallel_for_each to test both.

Do this using a slightly unusual file-self-inclusion.  Doing so keep things
readable and maintainable, and avoids macrofying functions.

Tested on x86_64-linux.
gdb/unittests/parallel-for-selftests.c