Reading the unused tail past size() is undefined behavior, exclude MSVC from the tail check.
| 33 | // Reading the unused tail past size() is undefined behavior, exclude MSVC |
| 34 | // from the tail check. |
| 35 | std::string_view StringArea(const std::string& string) { |
| 36 | #if defined(_MSC_VER) |
| 37 | return {string.data(), string.size()}; |
| 38 | #else |
| 39 | return {string.data(), string.capacity()}; |
| 40 | #endif |
| 41 | } |
| 42 | |
| 43 | // same as GTest ASSERT_PRED_FORMAT2 macro, but without the outer GTEST_ASSERT_ |
| 44 | #define COMPARE(val1, val2) \ |
no test coverage detected