GSL/tests
Dmitry Kobets 9face82309
Remove unnecessary check from size_bytes() (#1105)
`size_bytes()` returns the span's size in bytes. 
Assuming the span was constructed with an accurate size parameter, the check `size() < dynamic_extent / sizeof(element_type)` isn't required, since `size_t(-1)` (which is `dynamic_extent`) represents the size of the address space, so the number of bytes will never exceed it and in practice won't even come close.
Otherwise, it is not actually feasible to detect cases when the size parameter does not correspond to the dimensions of the underlying data pointer. In these cases, the relationship `size() < dynamic_extent / sizeof(element_type)` is simply one of many ways in which the `size()` could be incorrect, and serves no necessary purpose.

Resolves #1012
2023-05-09 09:05:26 -07:00
..
algorithm_tests.cpp Fix/implement C++2020 compilation, tests, and CI (#1017) 2021-12-09 14:54:06 -08:00
assertion_tests.cpp cleanup natvis (#1077) 2022-12-29 10:21:11 -08:00
at_tests.cpp 1075 Wrong Expects in gsl::at? (#1076) 2023-01-18 13:33:20 -08:00
byte_tests.cpp simplify to_byte (#1090) 2023-02-14 14:10:56 -08:00
CMakeLists.txt Raise CMake min to 3.14 (#1083) 2023-02-06 11:16:37 -08:00
CMakeLists.txt.in Fix googletest build failure with gcc 11.1+ (#1015) 2021-11-17 12:24:40 -08:00
deathTestCommon.h gsl::at behavior change regarding gsl::span (#985) 2021-05-20 18:18:08 -07:00
no_exception_ensure_tests.cpp Fix iPhone simulator CI (#981) 2021-05-13 10:52:09 -07:00
notnull_tests.cpp add not_null and strict_not_null tests for const (#1085) 2023-02-06 13:16:06 -08:00
owner_tests.cpp gsl::at behavior change regarding gsl::span (#985) 2021-05-20 18:18:08 -07:00
span_compatibility_tests.cpp Fix/implement C++2020 compilation, tests, and CI (#1017) 2021-12-09 14:54:06 -08:00
span_ext_tests.cpp 1075 Wrong Expects in gsl::at? (#1076) 2023-01-18 13:33:20 -08:00
span_tests.cpp Remove unnecessary check from size_bytes() (#1105) 2023-05-09 09:05:26 -07:00
strict_notnull_tests.cpp add not_null and strict_not_null tests for const (#1085) 2023-02-06 13:16:06 -08:00
utils_tests.cpp Clean up final_act and finally, closes #846 (#977) 2022-10-10 16:09:21 -07:00