diff --git a/test/format-test.cc b/test/format-test.cc index 45cfe824..f00d01e5 100644 --- a/test/format-test.cc +++ b/test/format-test.cc @@ -35,10 +35,7 @@ #include #include -// Check if format.h compiles with windows.h included. #ifdef _WIN32 -# include - // Fix MSVC warning about "unsafe" fopen. FILE *FOpen(const char *filename, const char *mode) { FILE *f = 0; diff --git a/test/util-test.cc b/test/util-test.cc index bb89a97e..98f99d5b 100644 --- a/test/util-test.cc +++ b/test/util-test.cc @@ -27,9 +27,15 @@ #include #include "gtest-extra.h" -#include "format.h" #include "util.h" +// Check if format.h compiles with windows.h included. +#ifdef _WIN32 +# include +#endif + +#include "format.h" + using fmt::StringRef; namespace {