diff --git a/tests/gtest/avifallocationtest.cc b/tests/gtest/avifallocationtest.cc index d44b2430c8..fdfec57e89 100644 --- a/tests/gtest/avifallocationtest.cc +++ b/tests/gtest/avifallocationtest.cc @@ -188,6 +188,18 @@ TEST(EncodingTest, MaximumInvalidDimensions) { AVIF_RESULT_UNSUPPORTED_DEPTH); } +#if defined(__clang__) && defined(__has_feature) +// has to be on a different line for Windows. +#if __has_feature(memory_sanitizer) +#define TEST_EXTREMES 0 +#else +#define TEST_EXTREMES 1 +#endif +#else +#define TEST_EXTREMES 1 +#endif + +#if TEST_EXTREMES TEST(AvifAllocTest, Extremes) { void* p1 = avifAlloc(1); EXPECT_NE(p1, nullptr); @@ -195,6 +207,7 @@ TEST(AvifAllocTest, Extremes) { EXPECT_EQ(avifAlloc(std::numeric_limits::max()), nullptr); } +#endif } // namespace } // namespace avif