]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Fix tests for std::vector range operations
authorJonathan Wakely <jwakely@redhat.com>
Mon, 28 Oct 2024 13:05:53 +0000 (13:05 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Mon, 28 Oct 2024 13:52:53 +0000 (13:52 +0000)
commite320846fec00aaa3ca1f93790bc41dbc08503814
treed43d0cacad108bece3bd47ab49b91a87bbd35f26
parenta9ec1bc06bd3ccf18f6c7b2f0255ce7878b418b7
libstdc++: Fix tests for std::vector range operations

The commit I pushed was not the one I'd tested, so it had older versions
of the tests, with bugs that I'd already fixed locally. This commit has
the fixed tests that I'd intended to push in the first place.

libstdc++-v3/ChangeLog:

* testsuite/23_containers/vector/bool/cons/from_range.cc: Use
dg-do run instead of compile.
(test_ranges): Use do_test instead of do_test_a for rvalue
range.
(test_constexpr): Call function template instead of just
instantiating it.
* testsuite/23_containers/vector/bool/modifiers/assign/assign_range.cc:
Use dg-do run instead of compile.
(do_test): Use same test logic for vector<bool> as for primary
template.
(test_constexpr): Call function template instead of just
instantiating it.
* testsuite/23_containers/vector/bool/modifiers/insert/append_range.cc:
Use dg-do run instead of compile.
(test_ranges): Use do_test instead of do_test_a for rvalue
range.
(test_constexpr): Call function template instead of just
instantiating it.
* testsuite/23_containers/vector/bool/modifiers/insert/insert_range.cc:
Use dg-do run instead of compile.
(do_test): Fix incorrect function arguments to match intended
results.
(test_ranges): Use do_test instead of do_test_a for rvalue
range.
(test_constexpr): Call function template instead of just
instantiating it.
* testsuite/23_containers/vector/cons/from_range.cc: Use dg-do
run instead of compile.
(test_ranges): Fix ill-formed call to do_test.
(test_constexpr): Call function template instead of just
instantiating it.
* testsuite/23_containers/vector/modifiers/append_range.cc:
Use dg-do run instead of compile.
(test_constexpr): Likewise.
* testsuite/23_containers/vector/modifiers/assign/assign_range.cc:
Use dg-do run instead of compile.
(do_test): Do not reuse input ranges.
(test_constexpr): Call function template instead of just
instantiating it.
* testsuite/23_containers/vector/modifiers/insert/insert_range.cc:
Use dg-do run instead of compile.
(do_test): Fix incorrect function arguments to match intended
results.
(test_constexpr): Call function template instead of just
instantiating it.
libstdc++-v3/testsuite/23_containers/vector/bool/cons/from_range.cc
libstdc++-v3/testsuite/23_containers/vector/bool/modifiers/assign/assign_range.cc
libstdc++-v3/testsuite/23_containers/vector/bool/modifiers/insert/append_range.cc
libstdc++-v3/testsuite/23_containers/vector/bool/modifiers/insert/insert_range.cc
libstdc++-v3/testsuite/23_containers/vector/cons/from_range.cc
libstdc++-v3/testsuite/23_containers/vector/modifiers/append_range.cc
libstdc++-v3/testsuite/23_containers/vector/modifiers/assign/assign_range.cc
libstdc++-v3/testsuite/23_containers/vector/modifiers/insert/insert_range.cc