From 18e160eb4c2e9f5c750f5eb11ab13be44aa8de78 Mon Sep 17 00:00:00 2001 From: Fatih BAKIR Date: Mon, 8 Sep 2025 09:37:43 -0700 Subject: [PATCH] Add missing include for crtdbg.h (#4534) This header uses _CRT_ASSERT, which is defined in crtdbg.h but does not include it, causing a build error in format-test.cc Fixes the issue by including the header --- test/gtest-extra.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/gtest-extra.h b/test/gtest-extra.h index e08c94c0..71859835 100644 --- a/test/gtest-extra.h +++ b/test/gtest-extra.h @@ -15,6 +15,10 @@ #include "fmt/os.h" #include "gmock/gmock.h" +#ifdef _MSC_VER +# include +#endif + #define FMT_TEST_THROW_(statement, expected_exception, expected_message, fail) \ GTEST_AMBIGUOUS_ELSE_BLOCKER_ \ if (::testing::AssertionResult gtest_ar = ::testing::AssertionSuccess()) { \