diff options
author | Luc Grosheintz <luc.grosheintz@gmail.com> | 2025-07-16 15:45:43 +0200 |
---|---|---|
committer | Tomasz Kamiński <tkaminsk@redhat.com> | 2025-07-17 16:01:41 +0200 |
commit | df7beaccef31f19ee73f034eb98e0e47be008d8e (patch) | |
tree | 032839b7b16dab9e5d72f0b3141793e046d05391 /gcc/tree-ssa-loop-prefetch.cc | |
parent | fcf22e1764b3c242cf6b240b71a46403c7f112ae (diff) | |
download | gcc-df7beaccef31f19ee73f034eb98e0e47be008d8e.zip gcc-df7beaccef31f19ee73f034eb98e0e47be008d8e.tar.gz gcc-df7beaccef31f19ee73f034eb98e0e47be008d8e.tar.bz2 |
libstdc++: Refactor mdspan tests [PR121061]
PR121061 shows that the test coverage for custom integer types is
insufficient. Custom IndexTypes are passed to mdspan related objects in
one of two ways:
* as a template parameter pack,
* or as an array/span.
These two cases have different requirements on the (constness of) custom
IndexTypes. Therefore, the tests are restructured as follows:
* allow testing with different custom integers,
* separate code that tests the two cases described above,
* use int_like.h for all tests with custom integers.
The affected tests are for:
* creating extents, layout_stride::mapping and mdspan from
custom integers,
* mapping::operator() and mdspan::operator[].
PR libstdc++/121061
libstdc++-v3/ChangeLog:
* testsuite/23_containers/mdspan/extents/custom_integer.cc:
Enable checking with different custom integers. Improve
checking non-existence of overloads for incompatible custom
integers.
* testsuite/23_containers/mdspan/layouts/mapping.cc: ditto. Also
improve reuse of int_like.h.
* testsuite/23_containers/mdspan/layouts/stride.cc: ditto.
* testsuite/23_containers/mdspan/mdspan.cc: ditto.
* testsuite/23_containers/mdspan/extents/int_like.h: Rename (old
name).
* testsuite/23_containers/mdspan/int_like.h: Rename (new name).
(ThrowingInt): Add.
(NotIntLike): Add.
Reviewed-by: Jonathan Wakely <jwakely@redhat.com>
Reviewed-by: Tomasz Kamiński <tkaminsk@redhat.com>
Signed-off-by: Luc Grosheintz <luc.grosheintz@gmail.com>
Diffstat (limited to 'gcc/tree-ssa-loop-prefetch.cc')
0 files changed, 0 insertions, 0 deletions